presto-cassandra/src/main/java/io/prestosql/plugin/cassandra/RandomPartitionerTokenRing.java/RandomPartitionerTokenRing/getTokenCountInRange
class RandomPartitionerTokenRing:    @Override
    public BigInteger getTokenCountInRange(String startToken, String endToken)
    {
        BigInteger start = new BigInteger(startToken);
        checkTokenBounds(start);
        BigInteger end = new BigInteger(endToken);
        checkTokenBounds(end);

        if (start.equals(end)) {
            if (start.equals(MIN_TOKEN)) {
                return TOTAL_TOKEN_COUNT;
            }
            else {
                return ZERO;
            }
        }

        BigInteger result = end.subtract(start);
        if (end.compareTo(start) <= 0) {
            result = result.add(TOTAL_TOKEN_COUNT);
        }
        return result;
    }