mde/model — pull request #97 by tarnazar (2013-09-03 22:06:38+00:00)
Title: Update index.js

Add count function (2)
My propose:

this.count = function (model,callback) {
var collectionName = _collectionizeModelName(model.modelName)
, collection = this.client.collection(collectionName)
;

collection.count(function (err,data){
if (data) {
callback(null,data);
} else if (err) {
callback(err,null);
}
});
}