cache the number of items in the collection