Why did AutoInvoice process fewer lines than were selected?

This happens when both a credit memo for an invoice and the invoice itself are part of the same submission.

If the credit memo is selected first, then the credit memo goes unprocessed, without failure, because the invoice wasn't yet processed. The unprocessed credit memo remains in the interface table and will be processed the next time you submit the Import AutoInvoice process.