public function count(array $query = []): int
    {
        //Create options?
        return $this->collection->count(
            array_merge($this->query, $query),
            ['skip' => $this->offset, 'limit' => $this->limit]
        );
    }
public function count(array $query = []): int
    {
        //Create options?
        return $this->collection->count(
            array_merge($this->query, $query),
            ['skip' => $this->offset, 'limit' => $this->limit]
        );
    }
public function count ( array $ query = [ ] ) : int { //Create options? return $ this -> collection -> count ( array_merge ( $ this -> query , $ query ) , [ 'skip' => $ this -> offset , 'limit' => $ this -> limit ] ) ; }
Count collection. Attention, this method depends on current values set for limit and offset!

Attention, MongoDB is strictly typed!

@param array $query

@return int
Count collection . Attention this method depends on current values set for limit and offset!