Count number of different length

Hey guys,
I would like to know how to count the number of different length in a 3D grid? I tried with equality but it doesn’t work like I want.


This is the length list.

This is the list I want to have.

Count different length.gh (25.7 KB)

https://www.grasshopper3d.com/m/discussion?id=2985220%3ATopic%3A712507

Cool! Thank you very much!