The ROWS function is to return the number of rows in a reference or array.
Formula:
= ROWS(array)
Explanation:
Array is required. The number of the rows of the data range you are looking for.
=ROWS(A2:A6) returns 5 which is the number of rows of the data range A2:A6.
=ROWS(A3:A5) returns 3 which is the number of rows of the data range A3:A5.