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