def count_effect(e_trues, windows):
    """
    Get the number of times where e is true in the provided time windows.

    Parameters:
        e_trues: the timepoints where e is true.
        windows: a list of windows, i.e. c_and_x and not_c_and_x.

    Returns:
        The number of times (Int) e was true in the provided time windows.
    """
    res = 0

    for (ws, we), intersection in windows:
        for e in e_trues:
            e_cases = e_trues[e]
            inter = [e_case for e_case in e_cases if e_case in intersection]
            if e >= ws and e <= we and len(inter) is not 0:
                res += 1
                break
    
    return(res)