This is the divider Circuit to save searching.
Click image for larger version. 

Name:	divider.gif 
Views:	521 
Size:	47.4 KB 
ID:	2684

And here is the link to the RS sensor

midas.herts.ac.uk/Datasheets/opto/optoswitch.pdf

Rick