No longer need Counter backport, create counter dict manually to avoid the need to install the Counter backport.
Fixed support for removing specific values from a metadata elements array. Refactored code to be more clear.