Hotfix: Use `with_mapping_count` instead of pack and `list.length`

* Fixes script errors anytime section tree is rendered