Question: how to calculate possible combinations of 4 numbers?
Answer: For each choice of the first two digits you have 10 choices for the third digit. Thus you have 10x10x10 = 1000 choices for the first three digits. Finally you have 10 choices for the fourth digit and thus there are 10x10x10x10 = 10 000 possible 4 digit combinations from 0-9.