A common technique for counting objects is to pass them through a light beam. Problems can arise, however, if a part dithers on the edge of the light beam and is counted more than once, or if the direction of motion changes and a part is recounted rather than uncounted.