generalize test
correct skip on count
Merge branch 'countskip' into minmax
handle more complex case (but slowly)