Of all the numbers between 10,000 and 99,999 =90,000 numbers, there are 300 2s in every 1,000 numbers. From this 300 will subtract repeats of which there are 10 per 1,000, namely:22, 122, 222, 322, 422, 522, 622, 722, 822, 922. That leaves us with 300 - 10 =290 numbers with 2s in them. So, 290 x 90,000/1,000 =26,100
In the 4th position, we have 1,000 2s x 9 =9,000 2s. Such as:12,000, 22,000, 32,000, 42,000, 52,000, 62,000, 72,000, 82,000, 92,000.
In the 5th position, we have 10,000 2s, namely:20,000 to 29,999. So, in total, we have:
26,100 + 9,000 + 10,000 =45,100 numbers with 2s between 10,000 and 99,999. This is in accord with the following computer count of ALL digits between 10,000 and 99,999, which adds 900 repeated(or 10 x 90,000/1,000) 2s to the count:
(0=36 000, 1=46 000, 2=46 000, 3=46 000, 4=46 000, 5=46 000, 6=46 000, 7=46 000, 8=46 000, 9=46 000)
The above applies exactly the same to 3s =45,100.