'Return the number of nodes in the tree.'

def __len__(self):

    total = 0
    nodes_to_sum = collections.deque([self])
    while nodes_to_sum:
        current_node = nodes_to_sum.pop()
        if (not current_node.is_root):
            total += 1
        nodes_to_sum.extend(current_node.children)
    return total
