Returns an aggregated query object for a given entity type.
string $entity_type: The entity type.
string $conjunction:
\Drupal\Core\Entity\Query\QueryAggregateInterface The aggregated query object that can query the given entity type.
public function getAggregate($entity_type, $conjunction = 'AND') {
$service_name = $this->entityManager
->getStorageController($entity_type)
->getQueryServicename();
return $this->container
->get($service_name)
->getAggregate($entity_type, $conjunction, $this->entityManager);
}