@Override
    public void preGetOp(final ObserverContext<? extends RegionCoprocessorEnvironment> c,
      final Get get, final List<Cell> result) throws IOException {
      if (get.getAttribute("count") != null) {
        result.clear();
        // order is important!
        result.add(new KeyValue(count, count, delete, Bytes.toBytes(nDelete)));
        result.add(new KeyValue(count, count, put, Bytes.toBytes(nCount)));
        c.bypass();
      }
    }
Use a coprocessor to count puts and deletes. as KVs would be replicated back with the same
timestamp there is otherwise no way to count them.
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestMasterReplication.java