Which method you choose depends a lot on how fast those pulses are coming in. What is the maximum RPM of the shafts you are trying to measure the speed of?