Well I'm no genius at these either, but I use the mega as well. And I am running 16 outputs to drive a relay board I got off of eBay to turn on driveway lights. I also am using 2 inputs(interrupts) to detect and turn them on via a loop detector and IR detector. So to answer your question. The mega should support what you need. It does have 54 I/O pins . But I'm sure your aware of that.
I too, came from the parallyx community and went to the dark side.
I absolutetly love this stuff.