I have designed the most reliable method using transmission interruption using an array of 5mm Sharp or equiv IR Emitters
I chose a number of emitters placed in critical locations to detect the body without arm paths that create multiple counts. Thus several vertically spaced emitters are needed detect the chest position. Anti-bounce detection code was created to ignore false triggers. This was done using paired emitters spaced apart by a few cm at the same height and other pairs at different heights, so that as long as one pair was detected in successive events of blocked light with the same direction , then the direction can be determined and the object with redundancy. Time filter allows a wide range of walking speeds but slow enough to reject small objects (arm hand..book blocking the path that causes false triggers.
Our code was implemented in a couple hundreds bytes on a PIC. ( proprietary)
I used Sharp IR LED and Rx modulated carrier to send unique 8 bit bursts Mux'd to each LED sent from a PIC.
This way each sender position could be decoded in TDM fashion error free or blocked by the path. and direction and reliable object passing results.
In the end, we used it for BOB detection on shopping carts or Bottom of Basket security aide for cashier clerks. It could detect a case of beer in the bottom of American shopping carts... or a resistor wire crossing the path.
Accurate and reliable. Simple yet complex in Cross-correlation time filtered TDM array mapping with 7 LEDs.. perhaps only 4 needed here.