protected function getTotalLocationCount()
    {
        $platform = $this->connection->getDatabasePlatform();

        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder
            ->select($platform->getCountExpression('node_id'))
            ->from('ezcontentobject_tree')
            ->where(
                $queryBuilder->expr()->neq(
                    'node_id',
                    UrlAliasHandler::ROOT_LOCATION_ID
                )
            );

        return $queryBuilder->execute()->fetchColumn();
    }
protected function getTotalLocationCount()
    {
        $platform = $this->connection->getDatabasePlatform();

        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder
            ->select($platform->getCountExpression('node_id'))
            ->from('ezcontentobject_tree')
            ->where(
                $queryBuilder->expr()->neq(
                    'node_id',
                    UrlAliasHandler::ROOT_LOCATION_ID
                )
            );

        return $queryBuilder->execute()->fetchColumn();
    }
protected function getTotalLocationCount ( ) { $ platform = $ this -> connection -> getDatabasePlatform ( ) ; $ queryBuilder = $ this -> connection -> createQueryBuilder ( ) ; $ queryBuilder -> select ( $ platform -> getCountExpression ( 'node_id' ) ) -> from ( 'ezcontentobject_tree' ) -> where ( $ queryBuilder -> expr ( ) -> neq ( 'node_id' , UrlAliasHandler :: ROOT_LOCATION_ID ) ) ; return $ queryBuilder -> execute ( ) -> fetchColumn ( ) ; }
Returns total number of Locations in the database.

The number excludes absolute root Location, which does not have an URL alias.
Returns total number of Locations in the database .