put counter in json response