def count_paths(node):
    """
    Counts the entries in a nested dectionaries
    Args:
        node: (dict) the nested dictionary

    Returns: (int) the number of total leaf nodes

    """
    if not isinstance(node, dict):
        return 1
    else:
        s = 0
        for _, v in node.items():
            s += count_paths(v)
        return s