Count events and use in endJob to get the Ave occupancies right