Returns the number of columns in a matrix.