AnalogRead and the interrupt pins

Photo by Spencer on Unsplash

when I was working in a small project recently using an Arduino UNO (atmega328p) to control various relays with a set of push-buttons I was wonder about how can I use the minimum number of pins to achieve that.

atmega328 pinout, source researchgate