Use the command "dir" and do it in loops:
dir0 = dir('firstFolder');
numEntries = size(dir0,1)
by the way, your display of the title is interpreting as latex or something else and that is why the c is low, use
with title to avoid this.