Presumably the chain runs over sprockets. One relatively common method is to use a Hall sensor mounted across the sprocket teeth to detect movement. You can also put a magnet anywhere else on the sprocket or shaft and detect its rotation. Similar applications have been used in cars for many years now. Check out ABS braking system. They are also used in small gasoline engines (e.g., model airplane engines) to control timing. There is lots of information about both applications on the Internet.
John