That would be the way to do it. Having that said, this is currently inefficient because under the hood we deserialize all the values stored in that range. We can potentially change the implementation of range().count() to skip the deserialization and have it be more efficient. If that’s important to you, file an issue and we’ll take care of it ![]()