Counting Pages of a Book
Matlab, 43 bytes

y=hist(+num2str(1:input('')),47:57);y(2:11)


Example:

&gt;&gt; y=hist(+num2str(1:input('')),47:57);y(2:11)
10
ans =
     1     2     1     1     1     1     1     1     1     1


How it works:

1:input('') generates a vector of numbers from 1 to the input number.

num2str converts all those numbers to a space-separated string (char array).

The + converts from char to ASCII codes. Digits are 48 to 57 in ASCII.

hist counts how many times each of those ASCII codes appears. Actually the count for value 47 is necessary too, because hist collects all lower values in the first bin. So that 47 just intercepts all spaces and prevents them from being confused as zeroes.

Lastly, y(2:11) removes that first count and prints the result.