public function count($collectionName, $condition = [], $options = [])
    {
        $document = ['count' => $collectionName];

        if (!empty($condition)) {
            $document['query'] = (object) $this->buildCondition($condition);
        }

        return array_merge($document, $options);
    }
public function count($collectionName, $condition = [], $options = [])
    {
        $document = ['count' => $collectionName];

        if (!empty($condition)) {
            $document['query'] = (object) $this->buildCondition($condition);
        }

        return array_merge($document, $options);
    }
public function count ( $ collectionName , $ condition = [ ] , $ options = [ ] ) { $ document = [ 'count' => $ collectionName ] ; if ( ! empty ( $ condition ) ) { $ document [ 'query' ] = ( object ) $ this -> buildCondition ( $ condition ) ; } return array_merge ( $ document , $ options ) ; }
Generates count command
@param string $collectionName
@param array $condition
@param array $options
@return array command document.
Generates count command