Have you tried: carried()"Returns the number of items carried by the player excluding worn items (shallow)."
D’oh! I swear I searched the documentation and didn’t find anything, but there it is. Thank you!
The lesson for me here is not to underestimate the value of a good night’s sleep.