To track the quantity of parts available on a rack to ensure a push-through manufacturing process, one option is to mount two detection sensors either alongside or above the rack which can detect parts at two different levels, or for smaller parts you can check stocking level with a distance measuring sensor.
Leuze electronic
www.leuzeusa.com