Okay, did some quick calulations and the largest output will be 654321. Which requires 20 digital output lines. So I decided why not simplify the design and consider only the first four buzzer presses. In this case the maximum output would be 6543. Which requires only 13 digital lines. DO ABLE i guess!
If there are only 4 outputs, wouldn't the largest then be 4321?
What does the largest output value have to do with the numbers of pins required?