How to get Duplicated Family Type Count on a list - Dynamo

Hi, in the picture below, I’m using 3 different methods to get duplicate items out of a list. For some reason, this is not working for family-type elements. My goal here is to be able to extract a final list with unique names and their counts. In my example here, I have 2 duplicate items with unique IDs, please help me maybe there are other methods or specific nodes that can solve my problem. I’m new to dynamo so your help will be very valuable. Thanks.

Ok find it, if anyone has the same issue, the solution is simple, you need to transform the list with the node string from obj and it will work. I’m wondering if there’s any other way to do it. Thank you to share your thoughts.

@wael.benhassine It’s not working because you are applying the 3 different methods on family instances (aka elements). Each Revit instance is unique irrespective of them having a similar family type.

So if you want to find unique family types, you need to first get the family type from the instance and then put it through the UniqueItems/GroupByKey/DuplicateItemIndices node. Something like this:

NOTE:
Using the String From Object might have worked for you now. But it might not yield accurate results every time. For example, if you had a selection of walls like below with different types and you try to use String from Object node, it might fail miserably!