I am playing around with MongoDB trying to figure out how to do a simple
SELECT province, COUNT(*) FROM contest GROUP BY province
But I can
This would be the easier way to do it using aggregate:
db.contest.aggregate([ {"$group" : {_id:"$province", count:{$sum:1}}} ])