returns the number of rows of a matrix, an intmat or an intvec, resp.
the minimal rank of a free module in which the given module or
vector lives (the index of the last non-zero component).
Note:
Use ncols to get the number of columns of a given matrix or intmat.