Actually, you should be thinking about BOTH quality and quantity, in terms of calories.
As far as how long you should use a gainer, Rome wasn't built in a day. I'd say at least three months. As for which one you should use, the weight gainers are much better than they were 10 years ago, when I was using them.
It appears that the most economical one, at present time, is Ultimate Nutrition's IsoMass Xtreme Gainer. A 10-lb jug goes for $51. Of course, if you get it at GNC, during Gold Card week, that price drops to around $41. If you find some that's marked down AND use the card, you can get it for even less.
Bare minimum, you should use two shakes per day, along with at least three regular meals. Depending on your schedule, I'd recommend the second shake be taken right after your workout.
If, your metabolism (and wallet) can afford it, I'd go three shakes along with three high-quality meals.