The bottom line is:
- If you want to know the number of rows in a table, use SELECT COUNT(*) FROM tablename.
- If you have issued a query and want to know how many rows are in the result, you must use MoveLast before examining the Count. The reason is that the SQL-engine might deliver the first page of results to you before it has actually finished the entire query.
If you can possibly avoid it,
don't go for that record count. Not unless you need it for some purpose other than giving the user an "interesting" number. Either
(a) you are running a redundant query (and an expensive one at that), or
(b) you're forcing the user to wait for full query completion (and... forcing the DBMS to actually complete it) ... all to produce, "an interesting but expensive number."