perf_counter: Robustify counter-free logic