The CountRows() function is used to count the number of rows in a table. The syntax is: CountRows(DataSource). For example, CountRows(Orders).