If we look at the checkin method in JModelAdmin, we can see that it returns the correct number of checked in record (via $count variable) when check in success. In some special case, this number might be different with the number of $ids pass to the method. So we need to replace count($ids) with $return to show the correct number of checked in records to users.