Count of installed packages
The gold standard today is Salesforce DX:
sfdx force:package:installed:list
But you could also write a Tooling API query:
SELECT Id FROM InstalledSubscriberPackage
Usage i.e. heavily or sparsely used
No direct way to get at this, as far as I can tell. You can export the package metadata (e.g. force:source:retrieve
) and parse the output, and then use /services/data/v52.0/limits/recordCount?sObjects=Object1,Object2,etc
to get the storage usage for those objects. Cumbersome, but definitely possible with a few API calls and some relatively simple scripts. You could theoretically even write this in pure Apex.
Also, to see how many fields are populated (e.g. non-null values), you might consider taking a Field Trip. This free package tallies up data usage in all fields/objects you select, and you can then export/report on this information. This helps identify custom fields on standard objects that you otherwise could not easily distinguish from using the above Record Count API call.
total number of objects (and fields) associated with installed packages.
Both queries below require the Tooling API (not the normal SOAP/REST API).
For fields:
SELECT COUNT() FROM CustomField WHERE NamespacePrefix='xyz'
For objects:
SELECT COUNT() FROM CustomObject WHERE NamespacePrefix='xyz'
Working from the above Salesforce DX, though, you can also retrieve the package contents, the use a terminal command to count the number of fields/objects that are used.
Basically, there's ways to get at all of this information.