Counting digit occurrences in a range

I was asked if I knew an easy way to count how many times digits occur within a range of numbers. For example in the range 10–15, how many times does each digit occur? The numbers 0, 2, 3, 4 & 5 each occur once, and 1 occurs 6 times, that is twice in the number 11, and one in every other number in the range, because the tens all start with a 1. It seemed like an odd request, but it’s for number tags on utility poles, like this one:

There might be several rows of yellow tag numbers on a given utility pole

By Onore Baka Sama – Own work, Public Domain, source

Electricians use these tags to identify the poles and, at least in Hungary, they’re made up of individual plates for each digit, that are screwed on to a larger plate on the pole. If you estimate too few when ordering the digits you’ll run out obviously, and if you order too many you’ll be stuck with a pile of unused digits.

It seemed like a problem that should have a simple mathematical solution to it. Unfortunately, the answers I found on Math Overflow Continue reading