Tidy-up tweaks to pulse_counter.cpp example