src/java/org/apache/cassandra/io/sstable/SSTableReader.java
/**
     * @param ranges
     * @return An estimate of the number of keys for given ranges in this SSTable.
     */
@param ranges
@return An estimate of the number of keys for given ranges in this SSTable.
@param ranges @return An estimate of the number of keys for given ranges in this SSTable .
public long estimatedKeysForRanges(Collection<Range<Token>> ranges)
    {
        long sampleKeyCount = 0;
        List<Pair<Integer, Integer>> sampleIndexes = getSampleIndexesForRanges(indexSummary.getIndexPositions(), ranges);
        for (Pair<Integer, Integer> sampleIndexRange : sampleIndexes)
            sampleKeyCount += (sampleIndexRange.right - sampleIndexRange.left + 1);
        return Math.max(1, sampleKeyCount * DatabaseDescriptor.getIndexInterval());
    }
public long estimatedKeysForRanges ( Collection < Range < Token > > ranges ) { long sampleKeyCount = 0 ; List < Pair < Integer , Integer > > sampleIndexes = getSampleIndexesForRanges ( indexSummary . getIndexPositions ( ) , ranges ) ; for ( Pair < Integer , Integer > sampleIndexRange : sampleIndexes ) sampleKeyCount += ( sampleIndexRange . right - sampleIndexRange . left + 1 ) ; return Math . max ( 1 , sampleKeyCount * DatabaseDescriptor . getIndexInterval ( ) ) ; }
@param ranges
 @return An estimate of the number of keys for given ranges in this SSTable.
@param ranges @return An estimate of the number of keys for given ranges in this SSTable .