hi thank you for your answer, the counting stops because the sensor can’t detect the object anymore after about one hour of working fine. It doesn’t have to be an optical sensor so I will try the capacitive one then, through beam is not posible because tablets are aligned all together so the beam will always be break, thank you for your recommendation I will try it right away !