increment counter in request handler and return its value in body