recuento agregado de MongoDB
#return the number of documents whose "field" field has a value of A
query = db.collection.aggregate([{
"$match": {
"field": "A"
}
},{
"$count": "number of occurrences"
}])
Annoyed Antelope