You need to put a count function in this, like so

count=0

for a = 1 : 9

for b = 0 : 9

results= a*1000+b*100+b*10+a;

if (rem(results,11)==0);

fprintf('The number %d is divisble by 11.\n ', results);

count= count +1

end

end

end

fprintf('There are %d terms divisible by 11. \n' , count)

Greenwich matlab course work?? name the varible count something else as this is what i called it in my course work :P