The rows command returns the number of rows in a matrix or tensor A.
A = [[1,2,3],[4,5,6]]; rows(A); 2