protected void updateErrorCounts(Map<Errors, Integer> errorCounts, Errors error) {
        Integer count = errorCounts.getOrDefault(error, 0);
        errorCounts.put(error, count + 1);
    }
The number of each type of error in the response, including {@link Errors#NONE} and top-level errors as well as
more specifically scoped errors (such as topic or partition-level errors).
@return A count of errors.
clients/src/main/java/org/apache/kafka/common/requests/AbstractResponse.java