Go to see the functions:
Get ( TotalRecordCount )
and, to get the count of the found set:
Get ( FoundCount )
Remember that a calculation field that uses those functions must have the result UNSTORED.
In layout mode, you can select options from the Insert menu that insert layout symbols that report these same two counts without using any field at all.