Reading and display RPM via aftermarket gauge

I need help with code reading and display on arduino shield lcd RPM signal from aftermarket gauge. Signal is pure because tip work smooth. I need read the signal for cut ignition.
RPM signal from ecu (coil or tach) -> rpm gauge -> arduino

Not what a tip worth smooth is .
Is the aftermarket rev counter connected to the cars ecu or to its coil/coil pack?
The later may well have hi voltage spikes. If you have a nice clean signal , I’d use it to drive an opto isolator into a digital input

This gauge work if is connected to the coil or to the tacho signal but dont work with crankshaft sensor. I thinking about stealing the signal from inside this gauge but i don't know how to convert this to arduino language and write the code which correctly read the signal

??