10. Among the integers between 1000 and 9999, how many are composed of four different digits, and the absolute difference between the unit digit and the thousand digit is 2?
10. From the set $\{0,1,2,3,4,5,6,7,8,9\}$, 16 pairs of numbers can be selected such that the absolute value of their difference is 2. Except for $(0,2)$, each pair can serve as the first and last digits of a four-digit number, with the two middle digits chosen from the remaining 8 digits, resulting in a total of $15 \times 8 \times 7=840$ numbers of the required form.