Google Spreadsheets' COUNT function can be used to count worksheet cells containing number data.

These numbers can be:

If a number is later added to a cell in the range that is blank or contains text, the count total is automatically updated.

### Numbers in Google Spreadsheets

In addition to any rational number - such as 10, 11.547, -15, or 0 - there are other types of data that are stored as numbers in Google Spreadsheets and they will, therefore, be counted if included with the function's arguments.

This data includes:

- dates and times;
- functions;
- formulas;
- and, at times, Boolean values.

### The COUNT Function's Syntax and Arguments

A function's syntax refers to the layout of the function and includes the function's name, brackets, comma separators, and arguments.

The syntax for the COUNT function is:

**= COUNT ( value_1, value_2, value_3, ... value_30 )**

value_1 - (required) the numbers or values to be totaled.

value_2, value_3, ... value_30 - (optional) additional data values or cell references to be included in the count. The maximum number of entries allowed is 30.

### COUNT Function Example

In the image above, the cell references to nine cells are included in the *value* argument for the COUNT function.

Seven different types of data and one blank cell make up the range to show the types of data that do and do not work with the COUNT function.

The steps below detail entering the COUNT function and its *value *argument located in cell A10.

### Entering the COUNT Function

Google Spreadsheets does not use dialog boxes to enter a function's arguments as can be found in Excel. Instead, it has an *auto-suggest* box that pops up as the name of the function is typed into a cell.

- Click on cell A10 to make it the active cell - this is where the results of the COUNT function will be displayed;
- Type the equal sign ( = ) followed by the name of the function
*count;* - As you type, the
*auto-suggest*box appears with the names and syntax of functions that begin with the letter C; - When the name
*COUNT*appears in the box, press the*Enter*key on the keyboard to enter the function name and open round bracket into cell A10; - Highlight cells A1 to A9 to include them as the function's range argument;
- Press the
*Enter*key on the keyboard to enter a closing round bracket "**)**" and complete the function; - The answer 5 should appear in cell A10 since only five of the nine cells in the range contain numbers;
- When you click on cell A10 the completed formula =COUNT(A1:A9) appears in the formula bar above the worksheet.

### Why the Answer Is 5

The values in the first five cells (A1 to A5) are interpreted as number data by the function and result in the answer of 5 in cell A8.

These first five cells contain:

- a number - cell A1;
- the SUM function - cell A2;
- an addition formula - cell A3;
- a date - cell A4;
- a time - cell A5.

The next four cells contain data that is not interpreted as number data by the COUNT function and is, therefore, ignored by the function.

- text data - cell A6
- a formula that generates the error value
*#DIV/0! -*cell A7 - the Boolean value
*FALSE*- cell A8 - a blank cell - cell A9

### What Gets Counted

As mentioned above, Boolean values (TRUE or FALSE) are not always counted as numbers by the COUNT function. If a Boolean value is typed in as one of the function's arguments it is counted as a number.

If, as seen in cell A8 in the image above, however, the cell reference to the location of a Boolean value is entered as one of the *value*arguments, the Boolean value is not counted as a number by the function.

Therefore, the COUNT function counts:

- numbers or Boolean values entered directly as one of the function's arguments
- individual cell references to the location of number data in the worksheet
- a range of cell references
- a named range

It ignores empty cells and cell references to cells containing:

- text data;
- error values;
- Boolean values.