from typing import Union


def check_node(left: Union[tuple, None], right: Union[tuple, None]) -> int:
    """
    Count 1 for each node found.
    (Unpacking directly in the parameters is faster)
    """
    return 1 if left is None else 1 + check_node(*left) + check_node(*right)