Factor out get_collection_size for quota