public static int getRangeCount(
      final Bytes32 min, final Bytes32 max, final NavigableMap<Bytes32, Bytes> items) {
    if (min.equals(MIN_RANGE) && max.equals(MAX_RANGE)) {
      return MAX_RANGE
          .toUnsignedBigInteger()
          .divide(items.lastKey().toUnsignedBigInteger().subtract(min.toUnsignedBigInteger()))
          .intValue();
    }
    return 1;
  }
This class helps to generate ranges according to several parameters (the start and the end of the
range, its size)
ethereum/trie/src/main/java/org/hyperledger/besu/ethereum/trie/RangeManager.java