View attachment 105058
Perhaps the OP meant one of these (commonly known as a photo-interrupter or opto-switch)? If mounted upside-down at the top of the slot then some filtering of smaller coins can be achieved (tut tut @ naughty people). Also, although the clock input should be normally low, the coin will create a high-low-high pulse, which is enough to clock the 4020, as long as it is fast enough... the sensor is normally a long way down the coin tube so that the coin is travelling quite fast by then - that also stops lolly-stick triggering (tut tut again!).