Starting in MongoDB 3.4, you can use the $sortByCount
aggregation.
Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.
https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/
For example:
db.contest.aggregate([
{ $sortByCount: "$province" }
]);