input: Write a python function to count the number of nodes in a tree.
  assert count_nodes(root) == 3
  assert count_nodes(node1) == 1
  assert count_nodes(node2) == 1
output: def count_nodes(root):
      if root is None:
          return 0
      return 1 + count_nodes(root.left) + count_nodes(root.right)