I'll comment your code so that you can see what is happening where.
Also, I suggest adding (for debugging purposes) two more disps as indicated so you'll see what is going on.
%# uigetfile reads the name of a file and stores it in file_input, for example 'mydata.dat'
[file_input,pathname] = uigetfile( ...
{'*.txt', 'Text (*.txt)'; ...
'*.xls', 'Excel (*.xls)'; ...
'*.*', 'All Files (*.*)'}, ...
'Select files');
disp(file_input)
%# fileparts splits file_input into name and extension. pathstr is empty, name is 'mydata',
%# ext is '.dat', and versn is empty
[pathstr, name, ext, versn] = fileparts(file_input)
disp(name)
%# name is a string containing, in our example, 'mydata'
%# r is the number of rows in the string 'mydata', which is 1
%# c is the number of columns in the string 'mydata', which is 6
r = size(name,1);
c = size(name,2);
disp(r)
disp(c)
If you want the size of your dataset, you need to load the dataset first.
Alternatively, if your dataset has always a fixed number of columns, for example, you can try to estimate the number of rows from the size of the file
%# get the file size (and other information about the file) using dir
d = dir(fullfile(pathname,file_input));
%# if the header contains, say, 10 bytes, and each row is 8 bytes, you find the number of rows
%# as follows
headerBytes = 10;
rowBytes = 8;
nRows = (d.size-headerBytes)/rowBytes;