To do this accurately, you would need to write a short computer code to count all the digits and then sum them all up. I just happened to have written such a code a while ago for another question of this nature:
It turns out that you have to add up all the individual digits of all the numbers from 1 to 49,999 and then would get exactly a total of 1,000,000 as follows:
(18889, 30000, 30000, 30000, 30000, 20000, 20000, 20000, 20000, 20000)=238,889.
0s 1s 2s 3s 4s 5s 6s 7s 8s 9s
Then you have =[18,889 x 0 + 30,000 x 1 + 30,000 x 2 + 30,000 x 3 + 30,000 x 4 +20,000 x 5 + 20,000 x 6 + 20,000 x 7 + 20,0000 x 8 + 20,000 x 9] =1,000,000 Exactly!!!