4 input counter with display
I am not sure what you want to use as displays. If just LEDs are sufficient to show the binary counts then you could use jk flipflops for up counting. JK FlipFlops are available in PDIP-16 packages such as SN74LS109AN IC which costs a dollar or two. Depending on the maximum counts required you could adjoin multiple flipflops to increase the counting bits.



The Sensor inputs pin shown in the picture could be connected to your sensors with the resistor to separate the 24V and 0V outputs of the sensors. The resistance values will have to be high enough such that the maximum sensor output current is not reached.