Trying to get total count along with some other properties.
db.collection.aggregate([
{
$match: {
"dob.age": 59
}
},
{
$count: "total"
},
{
$project: {
"dob.age": 1,
"total":1
}
}
])
Doesn’t seem to be working one way or another.
Also posted on Stack Overflow.