A problem with tr/// could be that it would count all occurrences, not only leading ones...
In reply to Re^2: counting leading white spaces by almut in thread counting leading white spaces by Spooky