Try this formula, it can tolerate blanks in the range and dates in different years

=SUM(IF(FREQUENCY(A2:A100,A2:A100-DAY(A2:A100)),1))

confirmed with CTRL+SHIFT+ENTER