The RCX only has 3 sensor ports, and they can only be used for analog input, as well as simple IO (passive vs. powered). There is no digital interface for the sensors. I would use the IR port and a PICAXE to expand, but to receive IR messages, you have to use 9 bytes at 2400 baud for a single user-byte; much too slow.
To exceed the 3 sensor limit (actually 6), I made a sensor multiplexer. It supports 8 RCX sensors on one input port; 4 light sensors, and 4 touch sensors.
The program to run it is written in NQC. The RCX switches channels by switching to passive, then back to powered mode. Switching like this takes the supply voltage from the clock pin for long enough to toggle, and advance the 4017, and returns the supply before C2 runs down. C1 keeps it from advancing every 3ms from the pulse of supply power. Q1 provides a reference point; when and only when the 4017 triggers it, the RCX will read 100%. R2 keeps it from ever seeing 100% from the touch sensors, and the light sensors need either direct sunlight or a laser beam (both very unlikely) to return 100%. If the program thinks it is at the homing pulse, but it is not reading 100%, it will advance until it sees 100% (thus getting back to the pulse it should be on).