You could try something like this:
for each vYear in 2014,2015,2016,2017,2018
let vTableStatement = if(noofrows('table')>0, 'join(table)', 'table:');
load Key, count([Company No]) as [$(vYear)]
resident Master where [Type]='Trading' and year([End Date]) = $(vYear) and year([Start Date]) = $(vYear)
group by Key;
Whereby if there isn't a special requirement to calculate with these data within the script I would probably not create such a crosstable else calculate them within the gui (and adjust the datamodel with an intervalmatch and/or a master-calendar if it's needed).
You will need another dimension in order to do that count during LOAD.
You're going to use something like this:
null() as [dimension 1],
null() as [Year]
for each YY in '-4', '-3', '-2', '-1', '0'
LET vYear = date(addyears(today()-1, $(YY)),'YYYY');
LET vMonthEnd = date(yearend(addyears(today()-1, $(YY))),'DD/MM/YYYY');
count([Company No]) as $(vYear)
WHERE [Type] = 'Trading' and [End Date] >= $(vMonthEnd) and [Start Date] >= $(vMonthEnd)
GROUP BY [dimension 1];