@eamon

I did this once and settled on a basic core counting system based on a webcam>video in watcher>difference actor>brightness calculator>inside range>counter

This effectively works as a simple motion detector that counts when it sees motion. Put your camera in a clever place in relation to the floor traffic in the area you are in and you get a decent counter.

I can imagine one might do the same thing with a Kinect and then include a luminance key actor to help crop out things that move slightly and would otherwise be in the background of your video causing noise in the system

I set the one that I did to watch folks that would walk by - it helps a bit if people are somehow directed to walk by it so that they only pass going in one direction- and if it saw X amount of brightness/movement it would count a person. I used some reference video recorded from where it would actually be installed and messed around with the sensitivity of the counter until it was good enough.  I also ended up using something like a 10-30 second re-trigger barrier. Where it would only count one person every so many seconds. This helped cut down on individuals that lingered in front of the camera from registering as 100's of people in just a few minutes. A fun problem to try and figure out!