I would like to know how to count the number of documents in a collection. I tried the follow
var value = collection.count(); && var value = collecti
Simply you can use
Model.count({email: 'xyz@gmail.com'}, function (err, count) { console.log(count); });