fn count(self) -> Count<Self>
    where
        Self: Sized,
    {
        assert_future::<usize, _>(Count::new(self))
    }
Drives the stream to completion, counting the number of items.

# Overflow Behavior

The method does no guarding against overflows, so counting elements of a
stream with more than [`usize::MAX`] elements either produces the wrong
result or panics. If debug assertions are enabled, a panic is guaranteed.

# Panics

This function might panic if the iterator has more than [`usize::MAX`]
elements.

# Examples

```
# futures::executor::block_on(async {
use futures::stream::{self, StreamExt};

let stream = stream::iter(1..=10);
let count = stream.count().await;

assert_eq!(count, 10);
# });
```
futures-util/src/stream/stream/mod.rs