Improve format of counter JSON output.