Added TIM4 like PWM pulse counter. Not tested.