I think I find the following much clearer than the `count`/`groupby` approach. Is there some reason you've avoided it?
```python
batch = True
while batch:
    batch = list(islice(iterable, size))
    if batch:
        yield batch
```