public function count($collectionName, $condition = [], $options = [])
    {
        $this->document = $this->db->getQueryBuilder()->count($collectionName, $condition, $options);

        $result = current($this->execute()->toArray());
        return $result['n'];
    }
public function count($collectionName, $condition = [], $options = [])
    {
        $this->document = $this->db->getQueryBuilder()->count($collectionName, $condition, $options);

        $result = current($this->execute()->toArray());
        return $result['n'];
    }
public function count ( $ collectionName , $ condition = [ ] , $ options = [ ] ) { $ this -> document = $ this -> db -> getQueryBuilder ( ) -> count ( $ collectionName , $ condition , $ options ) ; $ result = current ( $ this -> execute ( ) -> toArray ( ) ) ; return $ result [ 'n' ] ; }
Counts records in specified collection.
@param string $collectionName collection name
@param array $condition filter condition
@param array $options list of options in format: optionName => optionValue.
@return int records count
Counts records in specified collection .