Return the number of nodes in a binary tree.
1def treeSize(root: Optional[TreeNode]) -> int:2 if not root:3 return 04 return 1 + treeSize(root.left) + treeSize(root.right)