ModelBundle/Repository/SiteRepository.php
public function countFilterBySiteIds(array $siteIds = null)
    {
        $qa = $this->createAggregateQueryWithDeletedFilter(false);
        if (null !== $siteIds) {
            $qa->match(array('siteId' => array('$in' => $siteIds)));
        }

        return $this->countDocumentAggregateQuery($qa);
    }
public function countFilterBySiteIds(array $siteIds = null)
    {
        $qa = $this->createAggregateQueryWithDeletedFilter(false);
        if (null !== $siteIds) {
            $qa->match(array('siteId' => array('$in' => $siteIds)));
        }

        return $this->countDocumentAggregateQuery($qa);
    }
@param array|null $siteIds

@return int