Arduino and Hall effect sensor for measuring rpm in motorcycle

Hi everyone,

I have tried to build a device that can measure motorcycle's rpm with an arduino and hall effect sensor. The use of hall effect sensor is for counting current per unit time that flow on the cable that connected to spark plug. It is based on the working principle of the motorcycle engine. In 4 stroke engine, when a current flow on the cable, it will create an ignition in the spark plug, hence the combustion is occurred in the engine. Every current flowing will be creating two rotation in the motorcycle. To detect the current flowing, I use the hall effect sensor. It will count the number of current that flow in the cable every second. Then it is connected to arduino fo data processing. But i still confuse with the source code ang what type of hall effect sensor that is best for applying it? Anyone can help me?
Thanks for your aid.