Sensor to measure engine RPM

What about measuring the rpm off some rotating piece of machinery with a hall effect or similar proximity sensor?