There are two ways to count rows.
First is just use a dedicated method at the end of the query:
Second is more complaint with SQL language, where count is used as any other SQL function, at the begging of the query:
Count unique records:
©Elephant Software Klaudiusz Wojtkowiak