Microsoft Dynamics stores records for entities, and there could be number of records in one entity. Suppose, there is a scenario where you want to loop through all of the records in multiple entities, so you may need to fetch the total record counts in those number of entities to get the idea of the records in those entities.
This can be done fairly easily through Web API even if you are not a developer. Below is the one-line API call which lets you fetch the total records count for multiple entities in one-go:
/api/data/v9.1/RetrieveTotalRecordCount(EntityNames=['logical_name_1','logical_name_2', ...])
For Example:
https://xrmlabs1.crm8.dynamics.com/api/data/v9.1/RetrieveTotalRecordCount(EntityNames=['account','contact','opportunity','lead'])
Just paste that API call in your web browser and you can use a decent JSON formatter to easily take a look at the total record counts for all the entities mentioned in the API. It should look something like this:
Formatted JSON:
{ "@odata.context":"https://xrmlabs1.crm8.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.RetrieveTotalRecordCountResponse",
"EntityRecordCountCollection":{
In the above example, key named Keys will store all the entities you pass in your API call and key named Values will store all the records count for respective entities.