The estimate-count BASIC program displays a fast estimate of the number of items in a file.
estimate-count {file}
If no file-save or AQL report has ever been run against the file, then this command may take a significant amount of time to complete. Otherwise, the result is virtually instantaneous.