public function count($filter = null)
    {
        try {
            return $this->select('COUNT(*)', $filter)->fetchColumn();
        } catch (\PDOException $e) {
            throw new StorageException($e->getMessage());
        }
    }
public function count($filter = null)
    {
        try {
            return $this->select('COUNT(*)', $filter)->fetchColumn();
        } catch (\PDOException $e) {
            throw new StorageException($e->getMessage());
        }
    }
public function count ( $ filter = null ) { try { return $ this -> select ( 'COUNT(*)' , $ filter ) -> fetchColumn ( ) ; } catch ( \ PDOException $ e ) { throw new StorageException ( $ e -> getMessage ( ) ) ; } }
Gets the number of rows from the storage model based on entity
@param array $filter A list of filters (pairs columns => value)
@return int
@throws StorageException
Gets the number of rows from the storage model based on entity