title: How to count distinct date items in a timestamp field in Mongoose/NodeJS?
body: <p>I use Mongoose in my NodeJS, and I have a collection with documents that look like this - </p>
  
  <pre><code>var SomeSchema = new Schema({
      date: {
          type: Date,
          default: new Date()
      },
      some_item: {
          type: String
      }
  });
  </code></pre>
  
  <p>The <code>date</code> field contains date with the time component (for example, <code>2014-05-09 09:43:02.478Z</code>). How do I get a count of <strong>distinct</strong> items for a given date, say <code>2014-05-08</code>?</p>
  
  <p><strong>EDIT:</strong> Ideally, I would like to get a count of records for each distinct date.</p>