This is based on direct incidence of radiation on the photodiode.
Whenever an item obstructs the invisible line of IR radiation
we make an increment in the value of a stored variable in a computer/microcontroller which may be indicated by LEDs, Seven Segment Displays, LCDs etc