To answer this question my thought was to solve the problem by parts. So, first I counted how many numbers with all different digits there are less than $4000$:
For the first position (left to right) there are $4$ possibilities $(0,1,2,3)$. For the second position there are $9$, for the third they are $8$ and for the last we have $7$. Multiplied all possibilities, $4 \cdot9\cdot8\cdot7=2016$.
Then I counted how many numbers with all different digits there are less than $1000$. In this case one have at most $3$ positions. For the first position there are $10$ possibilities $(0,1,2,...,8,9)$, on the second position there are $9$ possibilities and the last position have $8$ possibilities. So, $10 \cdot9\cdot8=720$
Making the difference, $2016-720$, we get $1296$. Now I will counted the numbers with all different digits between $4000$ and $4600$:
In this part I will counted for less than $4600$, until $4599$. For the first position there is only one possibility. For the second position there are $5$, $(0,1,2,3,5)$. For the third position there are $8$ and the last position have $7$ possibilities. So $1 \cdot5\cdot8\cdot7=280$.
Finally there are $1296+280=1576$ numbers with all different digits between $1000$ and $4600$. Is my thought correct? Thanks
sum(1 for i in xrange(1000,4601) if len(Counter(str(i)))==4)
$\endgroup$