callback with count on every op