Count of nodes
def countOfNodes ( head ) : NEW_LINE INDENT count = 0 NEW_LINE while ( head != None ) : NEW_LINE INDENT head = head . next NEW_LINE count += 1 NEW_LINE DEDENT return count NEW_LINE DEDENT