public function countByRootPageId(int $rootPageId): int
    {
        $queryBuilder = $this->getQueryBuilder();
        return (int)$this->getQueryBuilder()
            ->count('*')
            ->from($this->table)
            ->andWhere($queryBuilder->expr()->eq('root_pid', $rootPageId))
            ->execute()->fetchColumn(0);
    }
public function countByRootPageId(int $rootPageId): int
    {
        $queryBuilder = $this->getQueryBuilder();
        return (int)$this->getQueryBuilder()
            ->count('*')
            ->from($this->table)
            ->andWhere($queryBuilder->expr()->eq('root_pid', $rootPageId))
            ->execute()->fetchColumn(0);
    }
public function countByRootPageId ( int $ rootPageId ) : int { $ queryBuilder = $ this -> getQueryBuilder ( ) ; return ( int ) $ this -> getQueryBuilder ( ) -> count ( '*' ) -> from ( $ this -> table ) -> andWhere ( $ queryBuilder -> expr ( ) -> eq ( 'root_pid' , $ rootPageId ) ) -> execute ( ) -> fetchColumn ( 0 ) ; }
Counts rows for specified site

@param int $rootPageId
@return int
Counts rows for specified site