title: Count of the result of a MongoDB aggregate query
body: <p>After I write a MongoDB aggregate command, I would like to quickly look at the number of results it returned. </p>
  
  <p>Say, my query is something like this: (probably more complex)</p>
  
  <pre><code>db.zipcodes.aggregate( [{ $group :
                              { _id : "$state" } }])
  </code></pre>
  
  <p>Then, right now I do the following to get a total count:</p>
  
  <pre><code> db.zipcodes.aggregate( [{ $group :
                              { _id : "$state" }},
                           {'$group': {_id: null, count: {$sum: 1}}}])
  </code></pre>
  
  <p>Is there another quicker way to get a count of the results of a MongoDB aggregate query?</p>
  
  <p>PS: I've just seen a related question: <a href="https://stackoverflow.com/questions/20348093/mongodb-aggregation-how-to-get-total-records-count">MongoDB Aggregation: How to get total records count?</a> . Has there been any progress regarding this?</p>