Use better counting algorithm for event publish speed