Controlling 40 solenoids, 2 pumps, 2 servos, and a few sensors

For the solenoids and motors, I would be looking at using TPIC6B595s.

Coincidentally, I just received some in the mail this morning!