The $count stage is equivalent to the following $group and $project sequence:
$count
$group
$project
db.collection.aggregate( [ { $group: { _id: null, myCount: { $sum: 1 } } }, { $project: { _id: 0 } } ] )
TODO:
index 20250722 20250724