# Counting Duplicate Lists within a List

**URL:** <https://forum.dynamobim.com/t/counting-duplicate-lists-within-a-list/28032>\
**Category:** Lists-Logic\
**Created:** [November 4, 2018, 5:54pm UTC](https://forum.dynamobim.com/t/counting-duplicate-lists-within-a-list/28032 "2018-11-04T17:54:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![noam.ronen2](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@noam.ronen2](https://forum.dynamobim.com/u/noam.ronen2)\
**Post date:** [November 4, 2018, 5:54pm UTC](https://forum.dynamobim.com/t/counting-duplicate-lists-within-a-list/28032/1 "2018-11-04T17:54:51Z")

</div>

Hi all,

I am trying to count identical lists, within a larger list. I have looked through the forum, but the answers have not worked (I think because there are list nesting issues I do not understand). I’ve attached an example of the data I have, and what I want to have (a new list, with a count of identical lists.)

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/f/9fa3fdaf0707099449be0e089caf4172b2f09840.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [November 4, 2018, 6:31pm UTC](https://forum.dynamobim.com/t/counting-duplicate-lists-within-a-list/28032/2 "2018-11-04T18:31:23Z")

</div>

Not too pretty… but it does what you’re after 🙂 (The bottom image is simply a “NodeToCode” version of the top image) 🙂

[ConcatString.dyn](https://forum.dynamobim.com/uploads/short-url/7zxZlf9rKlGG5fcaFnKDPvcTGNs.dyn) (35.2 KB)

I’m using the Orchid and Clockwork packages 🙂

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/b/1b8a196833040d84f3709da86df6a6de7889c231.png)

t5 = Orchid.List.IndexOf(t6\<1\>, t7@L1\<2\>);  
t8 = DSCore.List.Flatten(t5, 1);  
t9 = DSCore.List.GetItemAtIndex(t8@L3\<1\>, 0);  
t10 = DSCore.List.Flatten(t9, -1);  
t11 = DSCore.List.GetItemAtIndex(t12@L3\<1\>, t10);  
t14 = DSCore.List.Flatten([t13,t11], 1);  
t15 = DSCore.List.Transpose(t14);

---

<div class="post-metadata">

**Author:** ![noam.ronen2](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@noam.ronen2](https://forum.dynamobim.com/u/noam.ronen2)\
**Post date:** [November 4, 2018, 6:53pm UTC](https://forum.dynamobim.com/t/counting-duplicate-lists-within-a-list/28032/3 "2018-11-04T18:53:24Z")

</div>

Works perfectly! Thanks a lot!
