Database
[{"name":"John Doe","City":"OK","Prepaid":"Y","Ethnicity":"a","Zip":"06516"},{"name":"Jane Doe","City":"CA","Prepaid":"N","Ethnicity":"b","Zip":"12321"},{"name":"Jule Doe","City":"OK","Prepaid":"N","Ethnicity":"a","Zip":"06516"},{"name":"Jake Doe","City":"OK","Prepaid":"Y","Ethnicity":"a","zip":"06516"}]
Query
db.collection.aggregate([{$group:{_id:{City:"$City",Prepaid:"$Prepaid"},Count:{$sum:1}}},{$group:{_id:"$_id.City",Count:{$push:{k:"$_id.Prepaid",v:"$Count"}}}},{$project:{_id:0,City:"$_id",Count:{$arrayToObject:"$Count"}}},{$project:{City:1,Count:{count:"$Count",filter:"Prepaid"}}}])