A good thought. But when you take such a large numbers, mostly you can't figure out what's your mistake exactly.

Let try with 2 character long.

Former answer gives 620, but your method gives 720. Which is right?

by your counting method, 97 counted twice. How?

First time you fix 9 first and then 7 .

Second time you fix 7 first then 9.

There are 100 patterns which are purely form digits. Each pattern counted twice. So delete 100 from your answer, which matches with the former formula