def count_bags_contained(bag: str, parsed_restrictions: list) -> int:
    """Count of bags that a given bag must contain (inc. itself)

    :param bag: Type of bag to check
    :param parsed_restrictions: List of bag-containing restrictions
    :return: Count of the total number of bags the given type contains
    """
    count = 0
    for parent, children in parsed_restrictions:
        if bag == parent:
            for child in children:
                count += (count_bags_contained(child[1], parsed_restrictions)
                          * int(child[0]))
    return count + 1