title: Is mongodb's $facet faster than 2 separate queries?
body: <p>I want to grab only 10 users at a time, but I also want to know how many there are total. Previously I did this using async and two separate aggregations, but I'm wondering if combining them into one would make it faster / less hard on the server.</p>
  
  <pre><code>Users.aggregate([{'$facet': {
      users: [{$limit: 10}],
      count: [{ "$group": {"sum": { "$sum": 1 }
        }}],
  }}]).exec(function(err, results) {
      if (err) return callback(err);
  
  });
  </code></pre>
  
  <p>Is this any faster that 2 separate queries? Or is facet just turning it into two separate queries? The queries may have some other stages added to them such as $match, if they're being searched.</p>
  
  <p>Essentially I need them to be counted in full, but also only return the first 10.</p>