First of all, the total number of toothpicks exceeds 20, so the maximum number is 29. Take out a part and put it in your pocket, leaving two digits on the table, so there are at least 10 toothpicks on the table. It is required that each number and ten numbers add up to a sum number, so the range of the sum number is 1 to 2+8(29 cannot be taken because at least one of them is taken): 10, 9, 8, 6, 4. The corresponding toothpicks are (28), (18, 27) respectively.
So when you know the number of toothpicks on the table, subtract them with 18 or 9. Guess, right? These are two possibilities!