Hi,
I agree with Tohu, its going to be pretty difficult to 'measure/count' real people, as they tend to be unpredictable. For example: are they going to move in a straight line? Will they move at a constant speed?? Will someone suddenly turn around and walk the opposite way?
If, as Tohu remarked, they are in a 'group', then a simple 'beam breaking' counter might not be good enough, especially if these people are moving close together, the beam will always be broken and count no-one.
If I was to build something, and wanted it to be as simple as possible, I would use ultrasonics instead of IR. Of course, both can be used to measure distance(and therefore speed) because sound travels a lot slower than light, and it'll give your circuit more time to get a distance, then wait some set time, take another distance, and calculate the distance traveled, with the known time delay, you get your speed.
If you constantly take readings, then you could look at your readings, and if it suddenly 'jumps', then obviously an object has either moved very quickly, or the oroginal object you were reading has gone 'out of sight' of the device, and you're now looking at a new object, which is also moving. Am I making sense ?
The alternative, would be that 'beam breaking' idea. This relies on the assumption that there are 'gaps' between people, and that they are consecutive (people do not cross in front of others) which I'm guessing will nearly always happen. If you simply have 'two' bea breakers,a set distance apart, then you can measure when one is broken, then when the other is broken. Thus, giving you a 'time to travel distance X', which again, nicely gives you their speed. And a counter could be incremented when either of these beams is broken, or (probably better) when you have a calculated speed thats not ridiculous (can people move at 30m/s? or 0.005m/s?).
I'm not aware of any circuit specifically designed to monitor 'people'. Mind you, I imagine any device design to measure a part of human behavior would be an enigneers nightmare
Regards,
BuriedCode.