Instance Method


Publishes the number of elements received from the upstream publisher.


func count() -> Publishers.Count<Publishers.Share<Upstream>>

Return Value

A publisher that consumes all elements until the upstream publisher finishes, then emits a single value with the total number of elements received.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software