title: how to get data in batches in mongodb
body: <p>I want to retrieve data from MongoDB, 5 at a time</p>
  
  <p>I am using limit to <strong>limit</strong> the number of records returned</p>
  
  <pre><code>router.post('/List', function (req, res) {
      var db = req.db;
      var collection = db.get('clnName');
      collection.find({}, { limit: 5 * req.body.requestCount }, function (e, docs) {
          res.json(docs);
      });
  });
  </code></pre>
  
  <p>Here, from the client i am incrementing the <strong>requestCount</strong> variable so that i get data in multiples of 5. 
  What i want to achieve is get first 5 data in first request, get next 5 data in second request, but what is happening is, i get first 5 data and <strong>then first 10 data</strong>.</p>
  
  <p>What change should i make to achieve what i need?</p>
  
  <p>will the use of <a href="http://docs.mongodb.org/manual/reference/method/js-cursor/" rel="noreferrer">batch size in mongo cursor methods</a> solve my problem?</p>