Please solve the programming task below using a self-contained code snippet in a markdown code block.

We call a positive integer special if all of its digits are distinct.
Given a positive integer n, return the number of special integers that belong to the interval [1, n].
 
Please complete the following python code precisely:
```python
class Solution:
    def countSpecialNumbers(self, n: int) -> int:
```