Database

[{"collection":"posts","count":50,"content":{"_id":{"type":"autoincrement","autoType":"int"},"name":{"type":"stringFromParts","parts":[{"type":"constant","constVal":"POST "},{"type":"int","minInt":1,"maxInt":10}]},"date_created":{"type":"date","startDate":"2022-10-02T00:00:00.000Z","endDate":"2022-10-20T00:00:00.000Z"}}}]

Query

db.posts.aggregate([{$match:{date_created:{$gte:new Date("2022-10-01"),$lte:new Date("2022-10-30")}}},{$sortByCount:"$name"},{$setWindowFields:{sortBy:{count:-1},output:{maxCount:{$max:"$count"}}}},{$match:{$expr:{$eq:["$count","$maxCount"]}}},{$unset:"maxCount"}])

Result