def _count_leading(line, ch):
i, n = <NUM_LIT:0>, len(line)<EOL>while i < n and line[i] == ch:<EOL><INDENT>i += <NUM_LIT:1><EOL><DEDENT>return i<EOL>
Return number of `ch` characters at the start of `line`.

Example:

>>> _count_leading('   abc', ' ')
3