...
The fetchCount Method
Another useful fetch command is fetchCount. Like 'fetch', users can also provide a FetchSpec (or parameters) to 'fetchCount'. The 'fetchCount' method then returns the count of the records that match the FetchSpec. This is useful when trying to determine whether a given search is refined enough.
...