Counts the number of elements within each aggregation. The
transform has three varieties:
Count.globally()counts the number of elements in the entire
PCollection. The result is a collection with a single element.
Count.perKey()counts how many elements are associated with each key. It ignores the values. The resulting collection has one output for every key in the input collection.
Count.perElement()counts how many times each element appears in the input collection. The output collection is a key-value pair, containing each unique element and the number of times it appeared in the original collection.
See BEAM-7703 for updates.