changed the count aggregator to be solely based on an array