Count number of duplicate items

Does anyone know how to count duplicate items?
Let’s say if the item is unique then counter is set to 1. But if duplicate item is created then increase the counter by 1 each time duplicate item is created.

1 Like