More efficent way of counting how many values contained in sub-lists

I have a list of sublists and i want to count how many of each item is in each list.

I can make it work using what is shown below but it takes a while to run when the list has 70k values.

Hi,
Can you provide a simple example and the desired result?

List.GroupByKey can get you the counts. Take note of the list levels on the nodes. If you can, make the data inputs consistent - the last item is a list, whereas all the others are a list of lists

1 Like

That’s perfect, runs the routine in a second rather than 60.