You can skip the loop, just say

```rust
let amt = iter.len();
```