The length(m) function returns the number of elements of m.
Example
OML
>> m=[1 -2;-3 4]
1 -2
-3 4
>> length(m)
4