Fixed counts output

not tested