Update index.js

add count functions

    obj.count = function() {
      var args = Array.prototype.slice.call(arguments)
        , callback = args.pop() || function () {};
      adapt = model.getAdapterForModel(name);
      if (!adapt) {
        throw new Error('Adapter not found for ' + name);
      }
      else {
        if (adapt.name == 'postgres') {
          throw new Error('Only mongodb adapters support.');
        }
      }
      return adapt.count(model[name],callback);
    }