Interfacing with non-5V signal

I'm working on a circuit that needs to interface with the tachometer output of an car engine ECU. The signal is a 0-12V square wave, which I'm thinking I need to step down to put into a digital input pin to count from the Arduino. My initial thought was to run the signal through AC coupling to an analog comparator, and set the supplies on the comparator to 0 and 5V. While this simulates fine in LTSpice, on reading the spec sheets for comparators it appears that having input voltage much above the source voltage isn't a normal mode of operation.

Does anyone have experience interfacing large-ish signals to logic-level circuits?

I liked the comparator solution because it worked largely agnostic to the waveform or offset, but I'm open to anything that will work with my 0-12V square wave.

you could use a voltage divider with some zener diodes clamped to the output to make sure the voltage stays in range. search the board, im pretty sure ive seen this question a few times

The simplest way is to just use a series resistor and clamp it to the rails with diodes, like this: http://www.thebox.myzen.co.uk/Tutorial/Protection.html only use a 100R resistor.

Next if you want to be a bit better then just run the signal into the base of a transistor (through a resistor) and connect the collector to the input pin and emitter to ground. Then enable the internal pullups by writing a high to a pin you have previously set to be an input.