How to read decade counter with minimum pins
Diodes!







simulate this circuit &ndash; Schematic created using CircuitLab

There's actually Hex and Dec counters like yours with that already built in (except the 4 resistors).

You pull one common low in this set-up (most common internal-diode scheme, so I drew that), usually with a MOSFET or Bipolar small signal device. If the corresponding switch is closed, the bit will read 0, if not, it WILL read 1.

You can of course easily flip this to be positive logic.

Small signal diodes come in 0603 and 0402 even, so if you'd want to do this on a volume board design, you could nearly invisibly integrate it into the row of pads where the counter connects.