Combined counter with pwm