main already supplies the donated box counts and their length. Your function needs only to add elements at indexes below count and return the total. Keep the existing print in main; the function should calculate, not print.
int sum_boxes(const int boxes[], size_t count) above main. Loop over exactly count elements and return their sum. Keep the supplied call and print exactly Boxes: 13 with a newline.As a manual check, replace one box count and see whether the result changes; then restore it.
Use a size_t index less than count and return the accumulator.