Motion sensors and graph

Aye, as has been said - if there's a constant stream of folk close together, the signal will always be blocked, and when they finally pass through, it will record as one person.

One way you could estimate it (albeit crudely) is to time how long it takes for a person to walk past the beam. You can do this yourself by writing a program to add to a counter every millisecond that the counter is blocked. You'd then walk through it a few times at average walking pace, noting the time recorded each time. Take an average of the time taken. Lets say the beam is blocked for 300 ms when one person walks through the beam.

Then maybe you could write a program that has the following condition does the following (the lads on here might better advise on how feasible this is):

if TIME >= 300 ms
then
set NUMBER_OF_PEOPLE = NUMBER_OF_PEOPLE + (TIME / 300)
else
set NUMBER_OF_PEOPLE = NUMBER_OF_PEOPLE + 1
end if

So if your person walks through faster than you, it'll record one person. If the signal is blocked for a period of time, it'll divide that time by the time it took you to walk through, giving a rough estimate as to how many people were in the line walking through (assuming they walked in single file). How many corridors are only single file? :-?

Maybe a better way would be to have some sort of sensor on the floor which would add to a counter every time a person stepped on it. This would be ideal on a stairwell as every 2 footsteps would equal 1 person (except those two-at-a-time-bastards).