There are many ways to count numbers in Excel by excluding duplicates, such as using the “Exclude Duplicates” function.
For those of you who don't know that this method of counting numbers excluding duplicates can also be used in PivotTables, I'll explain.

- Please select the range of data for which you want to use the pivot table.
- When you click the PivotTable button, a box will appear where you can choose whether to use the data model. Please click the box.Add this data to the Data Model"

3. After selecting the field value, you can check the option of selecting the value expression and the “Distinct Count” or duplicate value exclusion counting function.
Notice
Pivot duplicate values may not work depending on the Excel file format.
For example, duplicate values are not applied to files saved in CSV format.
In this case, please convert the file's save format.
conclusion
With the development of AI, individual capabilities in Excel systems may not be considered as important. However, I think continuous study is necessary because only the areas that you know are possible to put into practice immediately.