Compare the current value of the Bag corresponding to the object 'o'
with the value 'occurrences' and replace the value of the Bag with
the maximum of both values.
Compare the current value of the Bag corresponding to the object 'o'
with the value 'occurrences' and replace the value of the Bag with
the minimum of both values.