<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def columnCount(self, parent):
 """ Returns the number of columns for the children of the given parent. """

        # print("columnCount:",self)
        if parent.isValid():
            return parent.internalPointer().columnCount()
        else:
            return self.root.columnCount()