Returns the number of rows in a matrix.