I'd take the easy route:
printf("Directories scanned: %g", $directory_count);
printf("Directories scanned: %g", $directory_count);
That's precisely the problem the article addresses :) You could just about get away with it in English where the only number that won't work is 1, but what about Polish where "Directories" will take a different form if the number ends in a 2, 3 or a 4 but isn't 12, 13 or 14?
Thanks for the clarification. My point was that a workaround in English may not be a workaround in every other language in the world.
Good ideas: 0
Usability is everything: True