write number of events processed