INTP:
Without knowing your project, there may be alternative locations to place the photointerrupter.
If the thing is powering something on wheels, you could always use a wheel or a disc placed on the drive axis.
What is this gear of yours connected to? other gears? a toothed belt? if you experience any losses through slippage, counting revolutions near the output end may prove more meaningful.
Its a gear on a spindle that's driving a weight lifting apparatus.
If the gear detection doesn't work then I'll add a disc with slots on the end of the spindle but I just wanted to check that there wasn't an easy way that experienced users had already found...
Thanks v much for all the ideas, much appreciated