you want to multiply together the number of possible choices for each digit in the code.
0-9 is ten possible numbers, since repetitions are allowed (example code 2,2,2,2) there are ten possible choices per digit in the code.
10*10*10*10 = 10,000 four digit coded possible