myModel.find({}, function(err, items) { console.log(items.length); // Big number });
How can I limit the returned items to only the latest
models.Post.find({published: true}, {sort: {'date': -1}, limit: 20}, function(err, posts) { // `posts` with sorted length of 20 });