COLUMNS
Lookup

Returns the number of columns in a reference

Syntax:

=COLUMNS(array)

Example:

=COLUMNS(A1:D10)