That call returns an element "total" at the top level of the response
object that will be the number of packages for that order
number.https://www.shipstation.com/docs/api/shipments/list/#:~:text=%7D%0A%20%20%5D%2C-,%22total%22%3A%202%2C,-%22page%22%...
I did the same thing with our products, originally for the pick list.
Our packing slip "Order Items By" option is set to "None" to keep the
original order, but I just tested by switching it to "Warehouse
Location" and printing a packing slip, and it ...