Before generating all combinations, you can count them. Input "23": digit 2 has 3 letters, digit 3 has 3 letters. Product rule: 3 × 3 = 9 combinations.
Input "234": 3 × 3 × 3 = 27 combinations. Each digit contributes its letter count to the product.
The product rule tells you how many combinations exist before you generate them. That's the power of counting.