This design found in the web is working very nicely:
The breadboard circuit is for counting something that is breaking the light beam to the photocell but the principle is the same. The 10K VR will fine tune the intensity of the light needed to trigger the relay.