import operator


def _intersection_counts(sets, bool_tuple):
    """
    Given list of sets and boolean tuple, return count of intersection
    :param List[sets[str]] sets:
    :param Tuple[bool] bool_tuple:
    :return: Count of intersection
    :rtype: int
    """
    # For all False case, return 0
    if True not in bool_tuple:
        return 0

    # Operator dictionary
    set_ops = {True: operator.and_, False: operator.sub}

    # For each grouping, perform set operation
    zipped = sorted(list(zip(bool_tuple, sets)), reverse=True)
    _, base = zipped[0]
    for operation, s in zipped[1:]:
        base = set_ops[operation](base, s)

    return len(base)