return the max event count