6、Among the first 10000 positive integers $1,2, \ldots, 10000$, the number of integers whose digits contain at least two of the digits $2, 0, 1, 7$ (if the same digit appears multiple times: for example, 2222, it is counted as containing 1 digit) is $\qquad$ 

---

Note: The translation preserves the original format and line breaks.
6.3862

Analysis: Consider the opposite situation: (1) does not contain the digits 2,0,1,7; (2) contains only one of the digits 2,0,1,7;

Case 1: There are 6 digits left, so the total number is $6^{4}+6^{3}+6^{2}+6=1554$;
Case 2: If the digit contained is $2,1,7$, then the total number is $3 \times\left(7^{4}-6^{4}+7^{3}-6^{3}+7^{2}-6^{2}+7-6\right)=3738$; if the digit contained is 0, then the total number is $6 \times\left(7^{3}-6^{3}+7^{2}-6^{2}+7-6\right)=846$. Therefore, the total number for both cases is 6138, so the answer is 3862.