/**
  * {@inheritDoc}
  */
 public function count(array $sources)
 {
     return $this->aggregator->count($sources);
 }
 /**
  * Adds an aggregator with a name to the container
  *
  * @param AggregatorInterface $aggregator Aggregator to add to the container for later processing
  *
  * @throws AggregatorAlreadyExistsException
  */
 function addAggregator(AggregatorInterface $aggregator)
 {
     //Check if the name exists
     if ($this->hasAggregator($aggregator->getName())) {
         throw new AggregatorAlreadyExistsException($aggregator->getName());
     }
     //Add the aggregator to the container
     $this->aggregators[] = $aggregator;
 }