Counter for 4000hz

I need to read up to 150,000 RPM

So a Fiberoptic sensor for example such as D12SP6FVQ

From what I understand it outputs High or low, so I need to count how many times it pulses in "1 Second"

I have some other code running on my Uno so I most likely cannot use it for counting properly, Is there a shield/daughterboard that can do the count for me so I can query it?

There is a freq. counter library for arduino, that does counting in background using interrupts, so your loop code won't interfere

Magician:
There is a freq. counter library for arduino, that does counting in background using interrupts, so your loop code won't interfere

Thanks,

How does that work? If you use interrupts that will stop the loop code? And since arduino is a single threaded processor??

https://www.pjrc.com/teensy/td_libs_FreqCount.html

If you use interrupts that will stop the loop code? And since arduino is a single threaded processor??

Yes,for short period of time it would stop loop code, than execute code in ISR, and return back where it's left. It's the same like create separate thread. Multithreading itself, is dividing cpu time in small timeslots and share between many programs-applications.