The first digit on the left can not be $0$. So there are $9$ possible digits the first digit can be. Call that first digit $a$.
You will need another $a$ somewhere. There are $7$ places to put the second $a$.
Now you need a digit to go in the first free space from the left. The digit can be anything except $a$. Ao there are $9$ possible digits for the digit in the first free space to be. Call that digit $b$.
You will need another $b$ somewhere. There are $5$ places to put the second $b$.
Now you need a digit to go in the first free space from the left. There are $8$ possible digits. Call it $c$.
Now you need to place a second $c$ somewhere. There are $3$ places left.
Now at this point there are only two spaces left. They must both have the same digit. There are $7$ choices for that last digit.
So there are $9*7*9*5*8*3*7$ possible numbers.
I was very strict on order because I wanted to avoid double counting or any potential taking casese into accont.