In order to calculate the number of combinations in the 4 number computer cable lock, you take into account that there are 9999 combinations for a 4 number cable lock.
However, there is the exception that the four numbers can not be the same. That is, the combinations 0000, 1111, 2222, ... , 9999 are not taken into account. The number of not allowed combinations are 10, then you subtract this combinations to the initial 9999 combinations:
9999 - 10 = 9989
Hence, there are 9989 possible combinations