But this is unattractive because for large numbers of keys, in order to count the keys that fall within a given range, you have to go through all the keys and test whether they're in the range or not and to return them the same way. 