PS - You may also start wondering about things like, if the player’s wearing a hat, is that one of the things in the limit? What about in a backpack?
You’ll notice my code says ‘things carried by the player’. Carried is a particular definition, different to held, enclosed, and worn. I previously made a cheat sheet showing what items in what situations are scooped up by the different definitions: