Arduino Interrupt pins problem

Robin2:
You don't need a 1 second interval to know the pulse rate. All you need to know is the interval between two pulses (or the interval between a larger number if you want an average.

Rather than pick small holes in specific pieces of code that were just prepared as a typical example why not tell us exactly what you want to achieve?

...R

Thanks for your advices but the problem is I am very curious about pin 2 which is not stable as pin 3. It seems there is a problem with timing. With 1 second intervals to show data it works well( or with baud rate of lower than 9600), but without that delay only pin 3 gives me the right results. Pin 2 is not stable and gives the higher rpm. even with your nice code it will happens.

At all, I don't have any problem with my code because I am using pin3.

Just to know if someone had same problem or knows the reason. Because it happens even with a very simple code.