org list sobject record-counts

Display record counts for the specified standard or custom objects.

Use this command to get an approximate count of the records in standard or custom objects in your org. These record counts are the same as the counts listed in the Storage Usage page in the Setup UI. The record counts are approximate because they’re calculated asynchronously and your org’s storage usage isn’t updated immediately. To display all available record counts, run the command without the –sobject flag.

force:limits:recordcounts:display

limits:recordcounts:display

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: Value

Override the api version used for api requests made by this command
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑sobject‑sType: Value
Default value:

API name of the standard or custom object for which to display record counts.
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.

Display all available record counts in your default org:

Display record counts for the Account, Contact, Lead, and Opportunity objects in your default org:

Display record counts for the Account and Lead objects for the org with alias “my-scratch-org”: