<s>[INST] Number of $10$ digit numbers such that every digit that appears appears exactly twice I need to find the number of $10$-digit numbers in which every digit that appears appears exactly twice.
I have attempted to solve this but am not sure if I am not overcounting something. 
The only problem is that a $0$ cannot stand on the leftmost position.
The first digit, say $i$, can be chosen in $9$ ways. Then, there are $9$ remaining places for the second $i$.
Now, we have $9$ possible remaining digits and $8$ remaining places. We need to choose $4$ digits, we can do so in $\binom{9}{4}$ ways. 
Now, the remaining places must be divided into two-element subsets, which can be done in ${8\brace 2}$ ways (Stirling numbers of the second kind).
Finally, we only need to distribute these $4$ numbers between these subsets, in $4!$ ways.
And so the final answer is:
$$9 \cdot 9 \cdot \binom{9}{4} \ {8 \brace 2} \cdot 4!$$
Is it the correct answer?
 [/INST] Since the leading digit cannot be $0$, there are $9$ ways to pick the leading digit.  There are $9$ ways to pick the other location for the leading digit.  There are $\binom{9}{4}$ ways to select which four of the other nine digits appear in the number.  There are $\binom{8}{2}$ ways to select the locations of the smallest of those numbers, $\binom{6}{2}$ ways to select the locations of the next smallest of those numbers, $\binom{4}{2}$ ways to select the location of the third smallest of those numbers, and $\binom{2}{2}$ ways to select the location of the largest of those numbers.  Hence, the number of $10$-digit positive integers in which every digit that appears appears exactly twice is 
$$\binom{9}{1}\binom{9}{1}\binom{9}{4}\binom{8}{2}\binom{6}{2}\binom{4}{2}\binom{2}{2}$$
As Joriki pointed out in the comments, ${8 \brace 2}$ is the number of ways of placing $8$ objects in two non-empty subsets, not the number of ways of placing eight objects in four subsets of size $2$, which is 
$$\frac{1}{4!}\binom{8}{2}\binom{6}{2}\binom{4}{2}\binom{2}{2}$$
If you replace your factor of ${8 \brace 2}$ by the above factor, your answer would agree with mine.
</s>