ModelBundle/Repository/ContentRepository.php
public function countNotDeletedByLanguage($contentId, $language)
    {
        $qa = $this->createAggregationQueryWithLanguage($language);
        $qa->match(
            array(
                'contentId' => $contentId,
                'deleted'   => false,
            )
        );

        return $this->countDocumentAggregateQuery($qa);
    }
public function countNotDeletedByLanguage($contentId, $language)
    {
        $qa = $this->createAggregationQueryWithLanguage($language);
        $qa->match(
            array(
                'contentId' => $contentId,
                'deleted'   => false,
            )
        );

        return $this->countDocumentAggregateQuery($qa);
    }
@param string $contentId
@param string $language

@return array