Add count to JSON format