https://leetcode.com/problems/count-complete-tree-nodes


Runtime: 92 ms, faster than 24.34% of Python3 online submissions for Count Complete Tree Nodes.
Memory Usage: 21.6 MB, less than 15.20% of Python3 online submissions for Count Complete Tree Nodes.


```python
counting = 0

def travel(node):
    global counting
    if node:
        counting += 1
        travel(node.left)
        travel(node.right)

class Solution:
    def countNodes(self, root: Optional[TreeNode]) -> int:
        global counting
        #4:15
        counting = 0
        travel(root)
        return counting
        #4:17
```