simplify `collection_size` after #2864