This problem can be solved with the COUNTIFS function or the SUMPRODUCT function, as explained below.
If you like, you could see the numbers underneath by temporarily formatting the dates with the Generalnumber format.
COUNTIFS function
TheCOUNTIFS functionis designed to count cells that meet multiple conditions.
This syntax is specific toa group of eight functions in Excel.
Because the named rangedatecontains 12 dates, each expression inside SUMPRODUCT returns anarraywith 12 TRUE or FALSE values.
When these two arrays are multiplied together, they return an array of 1s and 0s.
The result is $630.