@Override
  public int read() throws IOException {
    final int result = in.read();
    if (result != -1) {
      count++;
    }
    return result;
  }
Returns the number of bytes read.
dropwizard-metrics5/src/main/java/feign/metrics5/CountingInputStream.java