src/Repository/Doctrine/Repository.php
public function count(QueryParameters $queryParameters = null) {
        return (int) $this->getQuery(
            $this->entities->createCountQuery(),
            $queryParameters
        )->getSingleScalarResult();
    }
public function count(QueryParameters $queryParameters = null) {
        return (int) $this->getQuery(
            $this->entities->createCountQuery(),
            $queryParameters
        )->getSingleScalarResult();
    }
Retrieves the number of records in the table.

@param QueryParameters $queryParameters
@return integer