added count mehtod to return the number of entites in the aggregate.