eat_while()
Fixed it by inlining it in the two places where the count is used and simplified the logic there.