The big question is: what hardware do you have? Do you have PCI slots, ISA slots, PCIe slots? How about serial and USB ports?
And what are your requirements: Latency? Drive current? Electrical isolation?
The easiest answer might be a parallel (printer) ports. You used to be able to get dual and quad ISA bus parallel cards (with ribbon cables for the extra connectors). And the cheapest solution today would probably be to fill every PCI(e) slot with a single-port printer card, those can be had for under $10.
The other big advantage of parallel printer port cards: no driver issues, they mostly use the standard lpt driver.
These days, I would do it differently, not using cards that go into the computer, but external hardware. What I have in production at home are digital and analog IO cards that connect via serial port, look on the web for "Weeder IO modules". Very convenient, because with a thin RS232 cable, you can move your wiring to a convenient place, and you can get optocoupler or relay isolation if needed. The other convenient answer is to use a Raspberry Pi: For about $10, a Pi Zero W gives you about 2 dozen GPIO pins, in a super-convenient package, and you get your data over the network.