Given:Two dates, the bounds of a date range;A list of dates (given in-extenso in a line or a column);Is there a way, in Google Spreadsheet, to get the number of dates (days) in the date range that are included in the list of dates ?Example:[2017-01-01;2017-01-31] intersected with {2017-01-01, 2017-03-01} would yield 1Because the range on the left hand side, seen as a set, contains the 31 days of January {2017-01-01, ..., 2017-01-31} and the set on the right hand side contains the date 2017-01-01, which is a day of January.
Formula to compute the cardinality of the intersection of two sets of dates
google spreadsheets;formulas;date
Assume that:  A1: Holds the start dateA2: Holds the end dateColumn B holds the list of dates to count =QUERY(  B:B,  select COUNT(B) where B >= date '&  TEXT(A1,yyyy-mm-dd)&  ' AND B <= date '&  TEXT(A2,yyyy-mm-dd)&  ' label COUNT(B) '')