You cannot generalize that. It depends on the underlying alphabet. If that alphabet has n elements and your password four digits, there are n^4 possible combinations. With the Roman alphabet, you still have to decide whether to distinguish between lower-case and upper-case characters.