A TSOP IR receiver is designed to be sensitive to data in bursts of pulses with specified gaps between bursts, but have low sensitivity to continuous 38kHz modulation from compact fluorescent light bulbs. So its varying sensitivity might cause problems as a "blocking the beam" detector.
The datasheet shows an application circuit for it to feed a microcontroller. Its output goes low when it detects 38kHz modulated IR.
A 555 oscillator can drive an IR LED at 38kHz. Use additional IR LEDs driven from a booster transistor for more range.
Like all people counters, a wrong count will occur when two people enter or leave side-by-side and when a person enters at the same time as a person is leaving. If a person stops and blocks the beam then it can't count anymore.