Sensor to measure engine RPM

Does anyone have any ideas as to specifics for using a hall effect sensor on the spark plug wire (or detecting gear teeth), or is using IR the best choice?