rows(A) Returns the number of rows in A.
cols(A) Returns the number of columns in A.
A can be a vector or a matrix.
If A is neither a vector or a matrix, both rows and cols return zero.