Initially, people can get confused with the difference between SUM and COUNT. Sum totals the values in a range of cells, whereas COUNT simply counts the cells with a numeric value in, regardless of the figure.
Using the Count functionThe COUNT function is limited to numbers (which include dates and formulas) and does not count cells with text in them. The picture below shows a count of 5 cells with a number in, even though none of the cells in the range are empty.
This is a useful function but there may be times when it could be advantageous to count cells which have something in them, regardless of whether it's text or numbers.
This very straightforward formula is almost identical to COUNT. In fact its purpose is to count any alphanumeric character, so the structure of the formula is =COUNTA(), with the cell range you wish to count between the brackets.
COUNTA will count all alphanumeric data types including dates and formulas, so this formula essentially counts all the non-blank cells.
What is the COUNTIF function and when is it needed?You may not want to count all the numbers in a range, only certain ones, so to apply criteria to your COUNT formula, there is the COUNTIF function. The below formula would only count the cells with numbers in A1 to A10 if the value of the cell is less than (<) 10.
You can use COUNTIF on any alphanumeric data to apply criteria to it, it doesn't have to be used on numbers. For example, the following formula would count how many times the word "Cancelled" appeared in range A1 to A10.