Need help with Agg - ValueCount Distinct

Describe the issue:
We have effective dated records indexed.
When I do (.NetClient) client.SearchAsync by effectivedate I get all matching results and total shows all count of all matching records.

Example records :
{effectiveFromDate: 01-01-2024, effectiveToDate: 01-31-2024, product:“xyz” }
{effectiveFromDate: 02-01-2024, effectiveToDate: 02-29-2024, product:“xyz” }
{effectiveFromDate: 03-01-2024, effectiveToDate: 03-31-2024, product:“xyz” }

I am looking for aggregate count of distinct product within effective dates.

If I query effective from 01-01-2024 and effective to 02-15-2024 I will get first two records in documents and total of 2. I need a agg output of totalDistictProduct as 1.

Is there a way we can make this happen in SearchAsync through config or aggregations?

With Agg by Cardinality we can get unique counts