from bisect import bisect_right

def active_counts(intervals, queries):
    starts = sorted(start for start, end in intervals)
    ends = sorted(end for start, end in intervals)
    return [bisect_right(starts, t) - bisect_right(ends, t) for t in queries]
