fixed compilation by working around countUntil and replaceing ...

... a concrete ReturnType by auto

Not much to say here really 
I do not know why `countUntil` broke or why I had to add `auto`

but apparently it fixes the build