There are 27 (3^3) possible numbers made out of the digits 1 to 3, but that number includes the same digits in all possible arrangements. If we only include combinations we have 3 numbers using 1, 2 or 3 so that all digits are the same (111, 222, 333); if two digits are the same we have a choice of the two remaining digits as the third digit (3*2), so that makes 6; finally if all the digits are different, there is only one combination (123). That makes 3+6+1=10.