title: mongo query for selecting count of all unique ids in a collection
body: <p>In mongodb, I have a comments database with a collection of comments. Each comment has a "videoId" field that represents which video the comment belongs to. 
  How do I write a query that selects all unique videoId and count the number of occurrences for each unique videoId? I basically want a count of the number of comments per video.</p>
  
  <p>Since my web application is built on the Spring framework, the existing database calls are done through Spring Datastore with mongodb... what would that query look like with Mongo JSON based query methods and field restrictions?</p>
  
  <p>Thanks!</p>