Messure RPM width interrupt problem

you have electrical noise

what is the spec of the rpm sensor ?

is it a VR sensor with analogue or digital output ?