lib/memory-engine.js
function count(query, callback) {
    self.emit('count', query)
    findByQuery(query, options, function (error, objects) {
      self.emit('received', objects.length)
      callback(undefined, objects.length)
    })
  }
function count(query, callback) {
    self.emit('count', query)
    findByQuery(query, options, function (error, objects) {
      self.emit('received', objects.length)
      callback(undefined, objects.length)
    })
  }
function count ( query , callback ) { self . emit ( 'count' , query ) findByQuery ( query , options , function ( error , objects ) { self . emit ( 'received' , objects . length ) callback ( undefined , objects . length ) } ) }
Performs a count by query. Emits a 'count' event.

@param {Object} query to search by
@param {Function} callback
@api public
Performs a count by query . Emits a count event .