You'll set the list length to 5.
The ItemView Slots are recycled. Meaning the ItemViewSlots are always the same, only their contents change.
If that does not make sense check the hiearchy of the shop at runtime, hopefully it clarifies it.
1) open the demo scene
2) pickup/add a ton of unique items on the player character
3) go to the shop menu
4) press "Sell"
5) check the shop hierachy for the Inventory List
6) have a look at the ItemViewSlots as you scroll through the list, you'll see that we do not add/remove ItemViewSlots, on the ItemView inside the slot changes.
The UI cannot affect the Inventory in any way. The Inventory is just a collection of items organized in ItemCollections. If you want to limit the size of your Inventory you need to create an ItemRestriction component.
The UI is only used to display the data within the Inventory in any way you want (grid, list, filters, sorters, etc...)
In the next major update I'll be adding some new scriptableObject to create restrictions for your item collections easily, write now the best way is to write custom code for it, inheriting the IItemRestriction interface:
In most games Inventories have limitations, such as space or stack size, etc… By default ItemCollections have no limitations in the Inventory System. You are . . .
opsive.com
I hope this clarifies your doubts about the inventory.