Format counter output