title: How to count records with one distinct field in mongoose?
body: <p>While exploring mongoose for nodejs I ran into the problem of needing to know the amount of user in my collection: </p>
  
  <p>My collection has records, each record has a user. I want to know the amount of unique (different) users.</p>
  
  <p>How can I do this with mongoose?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The database is growing quite fast, is there anyway to get the number back from the DB instead of getting all the distinct records and counting them?</p>