For instance, if someone is working as a Phd in computer-science, but on a neuroscience related topic, she might need to take some neuroscience related courses. And some CS courses might not be any help at all for the area she is interested in. Do universities put a lower/upper limit on the number of courses one can take? Also, does this differ from university to university?
It varies dramatically, by university, field, and country.
It can be any of:
There is a fixed curriculum that everyone takes
There are a few required courses and the student can choose the rest
The student has a committee which recommends courses to take
The student can take any courses but has exams to pass
No coursework at all (I understand this is common in Europe, where Ph.D. students come in with a Masters)
Usually there are upper and lower limits on the number of courses to take. In the US, one usually has to take at least 3 or 4 courses to be considered a "full time student" and be eligible for funding. (But one can often count research as one or more of these courses.) And it is often not allowed to exceed 5 or 6 courses without special permission.
This is going to be school- and program-dependent. In my Computer Engineering program, we had to take two 1-credit overview courses (not intensive) our first semester, and then my advisor told me the courses he expected me to take during that semeseter. I ended up taking three full classes, which was probably excessive. Of course, then I took three the next semester, too... After the first semester, I chose courses that fit in with my research, and also courses that were required for the degree.
Here are some pros and cons to taking multiple courses and courses outside your field:
If you take more courses when you haven't yet begun research, you will have more time for research when you're more advanced (if you fulfill any requirements early).
Taking courses tangentially related to your field or outside your field leads to a greater body of knowledge in which to find interesting problems. This can lead to better research.
You'll meet more professors, and this can lead to other research opportunities.
You can easily become too busy to get research done, and research is what will get you the PhD. One of my fellow student's advisor tells his students, "No A plusses!" and what he really means is, you can study too hard on a course with a detriment to the more important research. During grad school, I only had one semester where I didn't take any courses (and it was nice, I'll admit).
You could lose focus entirely. Remember, getting a PhD is all about focusing on a particular problem until you are the expert on that problem. Spread yourself too thin, and you'll have a harder time reining in that one problem. This really is a minor minus, though, especially during your first year.
The bottom line is that you need to tailor your schedule to account for a number of factors, including your own sanity and your ability to do research. How your schedule is determined will largely be up to you, but each school will have its own individual requirements and policies.
You will likely piss people off at your major department if you take more courses outside than at the department itself. This will be viewed as lack of respect to them -- what kind of know-it-all are you??? One course is probably OK, especially if you "negotiated" that upfront by stating your multidisciplinary interests, but I wouldn't risk any more; not at least until you are done with the comprehensive exams, or whatever they may be called in your program. Passing them should be your top priority. You can also excuse yourself by declaring a Ph.D. minor in an additional field, or working towards an MA/MSc in that field. Again, that's something that needs to be discussed with your Director of Graduate Studies and adviser (which you may not have in the first year).
In my program, I took about 15-18 courses in my main department (statistics), another 6 in a graduate certificate program, and a scattered number of 1-2 courses in four or so other departments (economics, biostatistics, sociology, taking their [whatever]metrics courses), and graduated with some 70+ credit hours instead of required 45 or 48. I don't think they liked it very much... but then my tuition coverage came from another research center on campus that appreciated my breadth. Do as I say, not as I do, though, as I now work in industry after having failed the tenure track.