public ImportResult copyWithCounts(Map<String, Integer> newCounts) {
    return new ImportResult(type, throwable, Optional.ofNullable(newCounts), bytes);
  }
Creates a shallow copy of the current ImportResult but with the counts field set to the value
of the mapping given as an argument
portability-spi-transfer/src/main/java/org/datatransferproject/spi/transfer/provider/ImportResult.java