I need to count the people entering and going out a door.
This is a very difficult thing to do, many years of research have not shown a good and accurate way to do this.
Just as an example, suppose some one trips the first sensor and then she changes her mind and goes back. Now someone traveling in the opposite direction will trip the next sensor and some one will be clocked as going out, they will then trip the first sensor. Therefore all counting will be done in the wrong direction.
Now suppose two people are so close together that they only trip one sensor but by the time they trip the second sensor they have separated and trip it twice. Again you have a counting error of some sorts.
How accurate do you have to be?