Unpack the iterator before getting its length.

This matters for things like generators or network streams where it doesn't have a size normally.