% COUNTAS - Count the number of a’s in the input.
while 1
response = input('Enter a string:','s');
if (strcmp(response,'quit') |...
        strcmp(response,'exit'))
    break;
end
disp(count(response));
end