get number of rows from supported file name or matrix
nrowHelper(data)
data
either a file name or a matrix
number of rows