count unique records

count unique records

how to count only unique record with "aggregate records" task in script builder?
something similar to .distinct but that return total number of distinct not the list.
Example:
I have multiple entries with the same date in a date field. I want to count days (duplicate days just count ones)