In my program, I used two counters, Small and Large Broken Bottle Counters.
Then I used some math functions to calculate the Combined Box Fill = (15 x Large Count) + (10 x Small Count). The extra factor of 10 is to eliminate fractional numbers in an Integer-only PLC. Then for the Scrap Conveyor Motor, I set up parallel comparison instructions: IF COMBINED BOX FILL >= 145 AND NEXT BROKEN BOTTLE IS LARGE, OR IF COMBINED BOX FILL >=150 THEN START SCRAP CONVEYOR. The logic for the above is if the next broken bottle is Large, then its volume = 15 and will not fit into a box with level of 145 already, since full = 155.
Then if the level = 150, a small bottle will not fit either. I leave it to the student to set up a bit that anticipates the next broken bottle BEFORE IT ARRIVES AT THE SCRAP GATE. This method will fill the box 100% about 95% of the time, and within 95% the remainder.