cols(A) returns the number of columns in A.