I'm trying to build a project using IR sensors to count the number of people entering and leaving a room. I'm using 2 sensors for this---one for counting the number of people entering and the other for counting the number of people leaving. The problem is that I cannot find a way to switch off the second beam when the first is obstructed by a person entering and vice-versa. Could someone help? Also is there any other way to do the same? Please help...