logging number of events as well