Laser sensor

I made one to count the swings of a pendulum using just an ir led and ir photodiode. Worked fine, but they were only a cm or so apart.

Alternatively you could do what this guy recommends, and use something which detects IR modulated at (say) 38kHz. He uses a Panasonic PNA4602M; I've used a TSOP34838. Of course you need to modulate the source at 38kHz. You can do that easily with the Arduino tone() command, or use say a 555 like in that link.