> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/reference/copystorm-medic/count-records.md).

# Count Records

The CopyStorm/Medic Count Records tool performs a comparison of object record counts in Salesforce versus CopyStorm. This tool is provided as a sanity check for backup validation, to provide assurance that CopyStorm is copying all records properly.

## Run Count Records in a GUI

To access the Count Records GUI:

* Select “Other Tools” from the top-level menu.
* Select “Database Validation”, then “Count Records”

The UI for the Count Records tool contains four parts:

* The left-hand side of the dialog is used to select the tables to scan.
* The top part of the dialog has the following parameters:
  * of Tables to Process Concurrently.
    * Specifies how many tables the tool will process in parallel. Higher values may improve performance but increase resource usage.
  * Output To CSV *(checkbox).*
    * If checked, headless runs of Count Records will output tool results to STDOUT and Database Logs in CSV-compliant format.
* The lower part of the dialog displays the progress of a record count analysis as it happens.
* If an error is detected, a button will appear in the lower right hand corner. Click on the button to see error details and/or export the errors to a file.

![](https://4057376488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsbSqfKw3vSfr8qwXao4j%2Fuploads%2Fgit-blob-0f1aa3e7e2c5c1199bb43f8a0dccf2679b995be3%2F69643336-countRecords_screen1.png?alt=media)

## Running Count Records as a Batch Job

* Windows
  * `CopyStormMedic.bat -tool countRecords -run configFile.copyStormMedic`
* Linux / Mac OS
  * `sh CopyStormMedic.sh -tool countRecords -run configFile.copyStormMedic`
