mongo db query to count the numbers of same country code example Example: mongodb count distinct db.collection.distinct('field').length