CLOVIS
09/27/2025, 3:35 PMMongoCollection.countDocuments() does not call db.countDocuments(), but executes
aggregate([
{
"$match": {}
},
{
"$group": {
"_id": 1,
"n": {
"$sum": 1
}
}
}
])andylamax
09/27/2025, 4:51 PMCLOVIS
09/27/2025, 4:51 PMCLOVIS
09/27/2025, 4:52 PMandylamax
09/27/2025, 4:53 PMCLOVIS
09/27/2025, 4:53 PM$match is weird to me. It shouldn't be that hard to remove it? It's 69 pointless bytes.