Counts the number of indents that can be tabs or spacecount
        number of spaces in a row from the current line.

def count_indents(self, spacecount, tabs=0, offset=0):
        """Counts the number of indents that can be tabs or spacecount
        number of spaces in a row from the current line.
        """
        if not self.has_space(offset=offset):
            return 0
        spaces = 0
        indents = 0
        for char in self.string[self.pos + offset - self.col:]:
            if char == ' ':
                spaces += 1
            elif tabs and char == '\t':
                indents += 1
                spaces = 0
            else:
                break
            if spaces == spacecount:
                indents += 1
                spaces = 0
        return indents