def _check_size(node, size=0):
    """Recursive function, visits all nodes and counts number of elements. Return
    the number of elements."""

    if node is None:
        return size
    else:
        size += 1
        size = _check_size(node.left_node, size)    # Go down the left tree
        size = _check_size(node.right_node, size)   # Go down the right tree
    return size