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);
/// # });
/// ```
Drives the stream to completion, counting the number of items.
Drives the stream to completion counting the number of items .
fn count(self) -> Count<Self>
    where
        Self: Sized,
    {
        assert_future::<usize, _>(Count::new(self))
    }
fn count ( self ) -> Count < Self > where Self : Sized , { assert_future :: < usize , _ > ( Count :: new ( self ) ) }
Drives the stream to completion, counting the number of items.
Drives the stream to completion counting the number of items .
self
self
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.
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.
This function might panic if the iterator has more than [ ` usize :: MAX ` ] elements .
examples
None
futures::executor::block_on(async {
use futures::stream::{self, StreamExt}.

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


use futures :: stream :: { self StreamExt } . let stream = stream :: iter ( 1 .. = 10 ) ; let count = stream . count () . await .
});
None