The approximation given in the Wikipedia article (also mentioned in the paper by Diaconis & Mosteller (1989)) works well here. Suppose $N$ 4-digit numbers are drawn with replacement from a pool of $c$ possible numbers, $N\leq c$. According to Diaconis & Mosteller (1989), if $c$ is large and $N$ is small compared to $c^{2/3}$, the following approximation is useful. An approximation for the probability of no duplicates is
$$
\exp(-N^2/2c)
$$
You want this probability to be $\geq90\%$. In your case, $c = 10^4$. Solving the equation (there are two solutions but only one is positive) for $N$ so that $\exp(-N^2/2c)\geq0.9$ gives $N\leq \sqrt{-\log(0.9)\times2\times10^4}= 45.9044$. So you can draw around $46$ at most and more than that will result in a greater than $10\%$ probability of duplicates. In general, replace $0.9$ with the desired probability of no duplicates. This formula is also given in the Wikipedia article.
Thanks to @Henry, a better approximation to the probability of no duplicates is
$$
\exp(-N(N-1)/2c)
$$
resulting in $N\leq\sqrt{1/4 - 2c\log{(p)}} + 1/2$. Using your situation, we get $N\approx 46.4071$ with a probability of no duplicates of $0.9017$ which is extremely close to the true probability of $0.9015$.
R
provides the functions pbirthday
and qbirthday
that calculate the probabilities of no duplicates exactly.
Here is a plot comparing the two approximations with the exact probabilities in the relevant range:

The approximation by Henry is very close to the exact value, i.e. the black and green dots are basically identical.