Suppose that a certain school is very popular for its computer courses, but its non-computer related courses are virtually unknown. Is it possible for that school to have only one or few students finishing, say, a degree in economics?
Possible but uncommon.
The liberal-arts departments at MIT, for example, generally only have one or two students actually planning to get a degree in that area (usually, of course, as a double degree alongside something in the sciences or engineering.) Friend of a friend was the sole music major at one point. Small department since it isn't the school's primary focus, but I'm told the professors are excellent and of course you get a heck of a lot of attention from them. Of course first you need to get into MIT.
There is, to my knowledge, currently one undergraduate reading Jewish Studies at Oxford, so yes, it's very possible. More commonly, where a university enables courses to be combined for a joint honours degree, someone taking an unusual combination of subjects may well be the only one in that situation (and hence the only one to obtain a degree in X and Y).
It is also possible if a particular college has just started a discipline that is relatively unknown to many people. They might be wishing to promote this field, but since the discipline is not yet very popular, it might not get adequate number of students.
Also happens with offbeat combinations, especially in small colleges. A friend of mine from pure humanities had taken up mathematics as an optional subject and there were just three students in her class.
It is possible even in bigger universities, as some allows you do create your own degree if you make a reasonable petition, why you need it and why you think this degree is different from the already existing one. Note that in a credit-based education system it is possible to create a new degree without extra costs, assuming that student goes to already existing classes, only she/he has a unique combination of requirements for graduation.