def rowCount(self, parent):
if parent.column() > <NUM_LIT:0>:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>if not parent.isValid():<EOL><INDENT>parentItem = self.root<EOL><DEDENT>else:<EOL><INDENT>parentItem = parent.internalPointer()<EOL><DEDENT>return parentItem.childCount()<EOL>
Returns the number of rows under the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.