Using the analog inputs for more button switches

The Microchip application note AN234 has a good overview of saving input and output pins. It covers using resistors and analog pins for polling multiple switches.

It also has some info on multiplexing / charlieplexing to save output pins for driving LEDS, though I've switched over to using external LED drivers for this sort of thing (ex. the Allegro A6276).