Refactor _RemoveDuplicates to use counter state (#15242)
Refactor _RemoveDuplicates to use counter state (#15242)

* Refactor _RemoveDuplicates to use counter state

* Refactor _RemoveDuplicates to use counter state

* Refactor _RemoveDuplicates to use counter state.
lukecwik/incubator-beam,lukecwik/incubator-beam,apache/beam,chamikaramj/beam,chamikaramj/beam,robertwb/incubator-beam,lukecwik/incubator-beam,apache/beam,apache/beam,lukecwik/incubator-beam,apache/beam,apache/beam,robertwb/incubator-beam,lukecwik/incubator-beam,apache/beam,robertwb/incubator-beam,lukecwik/incubator-beam,apache/beam,chamikaramj/beam,apache/beam,lukecwik/incubator-beam,apache/beam,chamikaramj/beam,chamikaramj/beam,robertwb/incubator-beam,lukecwik/incubator-beam,apache/beam,chamikaramj/beam,robertwb/incubator-beam,robertwb/incubator-beam,chamikaramj/beam,chamikaramj/beam,robertwb/incubator-beam,lukecwik/incubator-beam,robertwb/incubator-beam,robertwb/incubator-beam,robertwb/incubator-beam,apache/beam,chamikaramj/beam,chamikaramj/beam,lukecwik/incubator-beam