exposing the count_events method