static int retries2Attempts(int retries) {
    return Math.max(1, retries == Integer.MAX_VALUE ? Integer.MAX_VALUE : retries + 1);
  }
Return retires + 1. The returned value will be in range [1, Integer.MAX_VALUE].
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java