Database

[{"_id":"phd/Klink2006","type":"Phd","title":"IQForCE - Intelligent Query (Re-)Formulation with Concept-based Expansion","year":2006,"publisher":"Verlag Dr. Hut, M?nchen","authors":["Stefan Klink"],"isbn":["3-89963-303-2"]},{"_id":"phd/Klink2006/1","type":"Phd","title":"IQForCE - Intelligent Query (Re-)Formulation with Concept-based Expansion","year":2006,"publisher":"Verlag Dr. Hut, M?nchen","authors":["Stefan Klink"],"isbn":["3-89963-303-2"]},{"_id":"phd/Klink2006/2","type":"Phd","title":"IQForCE - Intelligent Query (Re-)Formulation with Concept-based Expansion","year":2007,"publisher":"Verlag Dr. Hut, M?nchen","authors":["Stefan Klink"],"isbn":["3-89963-303-2"]},{"_id":"phd/Klink2007","type":"Phd","title":"IQForCE - Intelligent Query (Re-)Formulation with Concept-based Expansion","year":2007,"publisher":"Verlag","authors":["Stefan Klink"],"isbn":["3-89963-303-2"]},]

Query

db.collection.aggregate([{$group:{_id:{year:"$year",publisher:"$publisher",},count:{$sum:1}}}])

Result