Signals from optical sensors to count the number of people entering/leaving a room
You could pick a counter which is capable of representing the full required range natively, for example the 74F269 which is an 8-bit counter. You can then leverage the same trick you're using to feed B into the clock and A into the up/down control. Note that this is reverse from how you're using the 74LS190 chip because the U/D pin is count up on high for the 74F269 chip (missed this before).