Can Arduino IR obstacle Sensor be used as a tachometer to calculate rpm??

hi guy, I was wondering whether Arduino IR obstacle sensor can be use to calculate rpm? Provided that I have the coding for rpm counting...

Below is the IR obstacle sensor that I have ordered.

Why not?
Save it from ambient light.
May be place a fotodiode and LED on different sides of the hole?