Quickly regrouping lists Grouping takes a list and splits it into new lists of equal adjacent elements.  For example

[1,1,2,1,1] -&gt; [[1,1],[2],[1,1]]


If you then take the length of these groups you get a new list of integers

[1,1,2,1,1] -&gt; [2,1,2]


Your task is to write a program that takes a list of positive integers and find the number of times you can group and length it before the resulting list has a single element.  For example the list [1,2,3,3,2,1] can be regrouped 4 times

[1,2,3,3,2,1]
[1,1,2,1,1]
[2,1,2]
[1,1,1]
[3]


This is code-golf so answers will be scored in bytes with fewer bytes being better.

Test cases

[1,2,3,3,2,1] -&gt; 4
[1,2,3,4,5,6,7] -&gt; 2
[1,1,1,1,1,1] -&gt; 1
[2] -&gt; 0
[1,2,4] -&gt; 2
[1,2,2,1,1,2] -&gt; 4
[1,2,2,1,1,2,1,2,2] -&gt; 5
[1] -&gt; 0
Haskell, 49 bytes

import Data.List
f[_]=0
f c=1+f(length&lt;$&gt;group c)


Try it online!