If patron returns many items at the same time, it is useful to have list but also count of returned items to CHECKIN message. It works with CHECKINSLIP which is for printing the list of checked in items. There you can also have [% old_checkouts.count %] placeholder for amount of checkedin items. If patron wants email of checkedin items, the [% old_checkouts.count %] placeholder doesn't work on CHECKIN notice. Also <<old_issues.count>> doesn't work on CHECKIN notice. Is it possible to show the amount of checkedin items also on email?
I believe the CHECKIN notice works like the CHECKOUT notice, meaning that we start a new notice for the patron when the first item is returned. Then we amend the notice and insert another entry. And we keep doing that with every new return until the process_messagequeue job is run and the notice is sent out. Then we start a new one if there is a another return. This means that we don't loop over a result set at the time the notice is generated and can't count the entries like we do in other spots where .count works, because we have a quite different mechanic.