How to drop duplicates on a date field while aggregating and counting

You sample data and code are unusable by us.

Please read Formatting code and log snippets in posts and format accordingly.

You may also consider publishing using https://mongoplayground.net/.