Object counter « counting box »

Hi,

I’ve started to build the circuit, and i’m facing the 1st issues i didn’t think about.
With the 7-segment with 3 digits, i’m using 11 pins on the arduino. Then with the 3 buttons (reset, +1, -1), and the ir sensors, it’s minimum 4 pins additionnal (and more if i use more IR sensors...). But the arduino only has 12 pins available.
I was checking on the internet, and i found a way to reduce the amount of pins used for the 7-segments from 11 to 7 pins, using a 7447.

But it would still be ready sharp for amounts of pins.

  • is the 7447 solution good, or is there a most recent way to do it, or easier or cheaper ?

  • is there a way to reduce even more the amount of pins needed, that they all fit on the arduino without any restrictions ?

For information, i'll be using an Arduino Nano (i don't have any other), but i guess it will be enough for this.

Thank you,