getMatrixColumnCount
GetMatrixColumnCount is a utility function used to determine the number of columns in a two-dimensional matrix. The function typically takes a single argument, a matrix, and returns an integer representing the number of columns. In well-formed matrices, this equals the length of any row.
Parameter: matrix, a 2D array-like structure that represents the matrix. The function assumes a rectangular matrix,
Return value: an integer indicating the number of columns. If the matrix has no rows, some implementations
Performance: for most common representations, the operation is O(1), since the column count is intrinsic to the
Usage notes: the function is commonly used to allocate result matrices with compatible dimensions, to validate
Related functions: getMatrixRowCount, getMatrixSize, transposeMatrix, reshapeMatrix.