To count total rows in a range in Excel
If you need to count the number of rows in a range, use the ROWS function.
The ROWS counts the number of rows in the supplied range and returns that number as the result. See illustration below:
In the example, the active cell contains this formula: