COUNTA
The COUNTA formula is used to count the number of cells in a range that are not empty. To use the COUNTA formula, select the cell where you want the result to appear and enter “=COUNTA(” followed by the range of cells you want to count. For example, “=COUNTA(A1:A5)” would count the number of non-empty cells in cells A1 through A5.
Example:
The number of non-empty cells in cells A1 through A5 is =COUNTA(A1:A5).