$f(n) =$ the sum of digits of $n$ and number of digits in decimal notation. How many solutions does $f(x)=M$ have? For any integer $n$ let us denote $f(n)$ as the sum of digits in decimal notation of $n$ and number of digits in decimal notation. For example, $f(12) = (1+2)+2=5$. Now, consider the equation $f(x) = M$. Can I estimate the number of solutions?

I have a proof that it is $2^{M-2}$ for $M>1$ if digits were not capped at 9
First, $M=1$ does not follow this rule, but obviously there is $1$ solution. Now for $M>2$
Each digit except for the leftmost ranges from $0$ to $\infty$ and contributes a value ranging from $1$ to $\infty$, while the leftmost digit contributes a value ranging from $2$ to $\infty$.
Using generating functions, we want the coefficient of $x^{M}$ in the expansion of
$$\left(x^2+x^3+x^4+\ldots\right)\left( 1+\left(x+x^2+x^3+\ldots\right)+\left(x+x^2+x^3+\ldots\right)^2+\left(x+x^2+x^3+\ldots\right)^3+\ldots\right)$$
This simplifies to
$$\left(\frac{x^2}{1-x}\right)\left(1+\left(\frac{x}{1-x}\right)+\left(\frac{x}{1-x}\right)^2+\left(\frac{x}{1-x}\right)^3+\ldots\right)$$
$$\left(\frac{x^2}{1-x}\right)\left(\frac{1}{1-\frac{x}{1-x}}\right)$$
$$\left(\frac{x^2}{1-x}\right)\left(\frac{1}{\frac{1-2x}{1-x}}\right)$$
$$\frac{x^2}{1-2x}$$
$$x^2\left(1+2x+4x^2+8x^3+\ldots\right)$$
$$\sum_{k=2}^\infty 2^{k-2}x^k$$
Hence, the coefficient of $x^M$ is $2^{M-2}$.
When our digits are capped at $9$, we have to also cap most of our infinite geometric series to finite geometric series and this makes the generating function math a lot messier. However, the actual answer should still be somewhat close to $2^{M-2}$ for relatively small values of $M>10$.
The actual generating function would be the coefficient of $x^M$ in
$$\frac{x^2-x^{11}}{1-2x+x^{11}}$$
$$\left(x^2-x^{11}\right)\left(1+(2x-x^{11})+(2x-x^{11})^2+(2x-x^{11})^3+\ldots\right)$$
We can probably use this to estimate some smaller values, but an exact solution is rather complicated.
