Looks like I was too smart by half. I already had the value. Thanks to the people who responded, it made me think harder :0)
var invoiceItemCntResult = query.runSuiteQL({
query: 'select trandisplayname
from transaction
left join transactionline
on transaction.id=transactionline.transaction
WHERE custcol_cp_year > 0
and custcol_cp_carrierid !== null
and transaction.externalID = ?', params: [externalID]});
var invoiceItemCnt = invoiceItemCntResult.asMappedResults();
//Log ItemCnt
log.debug({
title: '1a. ItemCnt',
details: JSON.stringify(invoiceItemCnt.length)});