Added PWM counter. Tested.