For example:
The list is list of Users
First entry: User -> Id=111 name=aaa
First entry: User -> Id=123 name=aaa
First entry: User -> Id=124 name=ccc
First entry: User -> Id=125 name=ddd
First entry: User -> Id=126 name=ddd
The result if the param is Id is 5 and if it’s name it will be 3 (because there is 3 unique names)
The expected output is the count of Users with provided parameter when this param is distinct.
Thanks in advance
If I understand your question correctly (you want to know the count of users having a distinct Id or distinct Name), you could do the following: