title: Get a count of total documents with MongoDB when using limit
body: <p>I am interested in optimizing a "pagination" solution I'm working on with MongoDB. My problem is straight forward. I usually limit the number of documents returned using the <code>limit()</code> functionality. This forces me to issue a redundant query without the <code>limit()</code> function in order for me to also capture the total number of documents in the query so I can pass to that to the client letting them know they'll have to issue an additional request(s) to retrieve the rest of the documents.</p>
  
  <p>Is there a way to condense this into 1 query? Get the total number of documents but at the same time only retrieve a subset using <code>limit()</code>? Is there a different way to think about this problem than I am approaching it?</p>