The calculation is based on the Total Weight of the Order vs the Maximum Weight setting in the Shipping/Packaging ...

If the Order weight is less than or equal to the Maximum Weight, then the package is considered Small or Medium and the Tare settings for Small/Medium will be used ...

If the Order is more than the Maximum Weight, then the pagage is considered to be Large and the Tare settings for the Large will be used ...

The number of boxes is broken down by taking the Order weight and dividing it up to keep it below the Maximum Weight ...

Maximum weight should not be higher than what the Shipping method rate quote will use ...

Example: USPS will ship lighter weight packages than UPS ... so you cannot set the Maximum Weight based on UPS shipping rules if you also want to use USPS because you will not be able to get a quote if the Order weight exceeds the limits for USPS ...