Encapsulated gen_counter from handler's logic.