User.aggregate([ { $match: {"data": Date.now()}}, { $group: { _id:{username: "$username"}, count: { $sum: 1 } } } ], function (err, data) { });