i put a .0001 second delay in between each thing so it doesn't end instantly
how this works is. it adds a 0 to however long the list is to counters. it then stores the amount of first the amount of ones in the first slot of counters. then 2. then 3. repeat etc. once it does all that it just adds the lowest item in counters to list. its probably easier to see if you look at the actual code.