How to get input rate

Hi I’m trying to get input rate from a device.
Is there any good way to get input rate like input times per one second?
A value 1 is coming from a device.
Thanks.

What kind of device?
Depending on that the infoCHOP might give you what you need

It’s a magnetic sensor.
I’m trying to use it like a bike speed meter.
I just want to know it’s rotation speed.
When a magnet comes close to a sensor, a value 1 is coming.