It is a hall sensor so it reacts on a magnetic field. Obviously the pill supplied is not to be swallowed but glued someplace where the sensor can sense it.
So, I assume, the pill is glued on a rotating surface and the sensor attached nearby.
Basically hall sensors can detect frequencies high enough for this kind of use. The sure can do 1000Hz -> 60000 Rpm.
The electronic involved is very simple frequency counter.
These work. They will flicker on low rpm:s but stabilize as the rpms get higher.