Measuring motorbike rpm by stator frequency

I want to measure frequency which comes from stator, using this i get RPM, i need precise value to adjust clutch automatically and don't allow engine to stall so monitoring speed of stator should be enough to react if speed starts to go down too much. Stator have lot of coils, and i believe frequency should provide even small rotation speed change. The problem here is that i don't know how to measure this frequency with arduino, i have tried with small dc motor and it seems that it is counting something, also with ac-ac adapter i got 50 per second but while plug in/out sometimes lcd screen is going crazy, is it good way to do that?

If your bike has electronic ignition (and most new ones will), it might be possible to get data out of the engine management system or at least to tap the triggering pulse for the ignition. This will allow you to avoid freaky electrics that can easily fry your chip.