I've taught CS courses before, and have seen plenty of self-proclaimed self-taught know-it-alls who seem to be more stackoverflow-copy-pasters than anything else.
the division examples are not necessary either, thats the point. you can solve it different ways, that doesnt mean one way is not necessary, it just means its different. one may be faster, one may be more readable. If you dont allow different solutions you cant explore the tradeoffs between them.
I wonder what would happen if you implemented itoa and then counted digits. It’s pretty much the same thing.
for larger numbers it is probably faster.
Regarding itoa(), the first implementation provided in the article actually match it's implementation, without the unnecessary bits (building the output).
They should consider the upper bound of their algorithm. Because it uses floating point, it doesn't work for all natural numbers, as required by their specification.
To address your point, counting digits in base 2 is much simpler than in base 10, because the internal representation of the number on the computer is already base 2. You can use numeric calculations, but you can also just look at your digits.
(Edited for fewer tangents and to be more positive.)
In this case, even though the solution is disallowed for grading purposes, there is an opportunity to discuss it during the lesson.
Also, counting digits in base 2 is not the log2. The former gives you the latter but not the reverse. Finding the number of decimal digits in a number given in base 2 is not a simplification.
For example, if early in an elementary number theory class the student is asked to prove that there are in infinite number of primes of the form 4n+3, a solution that just invokes Dirichlet's theorem on primes in arithmetic progressions would probably not be acceptable. That approach does work to show that there are an infinite number of 4n+3 primes, but completely fails to show that that the student understood the material actually taught in class.
It's the exact same thing with the digit counting problem. Solving it by just invoking the built in string length function does little to demonstrate that the student understands the material taught so far.
...and then checks for and corrects the potential off-by-one thus incurred.
If you do these calculations by hand, the complexity will be more obvious because each operation will be smaller.