I think here you'll want to get the existing value in uniqueColValues, given the ImmutableBytesPtr key that you'll create. Then, add value to any existing value to keep a running total. You can save yourself one hash lookup if you do a put of value and only do another put if their was an existing value on the first put.