Creates a sink counting the items of the feed.
The feed is drained without retaining any item, so counting stays within constant memory whatever its size, but never completes on an infinite source.
The type of items in the feed
A sink resolving to the number of items the feed carried
await pipe( (items(1, 2, 3, 4, 5)) (count())); // 5await pipe( (items<number>()) (count())); // 0 Copy
await pipe( (items(1, 2, 3, 4, 5)) (count())); // 5await pipe( (items<number>()) (count())); // 0
Creates a sink counting the items of the feed.
The feed is drained without retaining any item, so counting stays within constant memory whatever its size, but never completes on an infinite source.