title: mongodb aggregate: how to get count with 2 parameters
body: <p>I have a data set with this structure:</p>
  
  <pre><code>{
  "price" : 48.00"
  "year" : "2008",
  "model" : "something",
  "manufacturer" : "ACME",
  "productgroup" : "3629",
  }
  </code></pre>
  
  <p>I want to count how many <code>items</code> a manufacturer has per <code>product group</code>, so the output for the above sample data, would be:</p>
  
  <pre><code>{productgroup:"3629", manufacturer: "ACME", count: 34 }
  </code></pre>
  
  <p>I do everything in <code>mongo shell/robomongo</code> and i am glad for every hint how to tackle this.</p>