title: group by day in mongodb and nodejs
body: <p>I have documents as the below in mongodb     <code>{ "_id" : ObjectId("4f956dee76ddb26752026e8f"), "page" : "home",  "visited" : ISOdate(23/02/2013) },  { "_id" : ObjectId("4f956dee76ddb26752026e8f"), "page" : "home",  "visited" : ISOdate(24/02/2013) },  { "_id" : ObjectId("4f956dee76ddb26752026e8f"), "page" : "home",  "visited" : ISOdate(24/02/2013) } , { "_id" : ObjectId("4f956dee76ddb26752026e8f"), "page" : "home",  "visited" : ISOdate(25/02/2013) }</code>   I want to get the day along with the count in mongodb using nodejs.  It should return:  <code>day: 23/02/2013, count:1 ,    day: 24/02/2013, count:2  ,day: 25/02/2013, count:1</code>.the result should be sorted in day so 23rd is first 24th is second and 25th is third. There are lots of entries around 1 million .</p>