Hello David,
Greetings! Welcome to Microsoft Q&A Platform.
Apologies for the inconvenience causing. I understand that you encounter discrepancies between Azure Storage Explorer and PowerShell when counting blobs in an Azure Storage container per your latest above comment,
For general information, some resources are hidden and not included in the normal listing requests. These are usually containers or tables maintained by the platform, such as for logging purposes. Make sure to include any snapshots, versions and soft deleted blobs/versions in your calculation. there might be hidden system containers counted by the metrics API.
The easiest non programmatic method is to navigate to the folder in Azure Storage Explorer and select folder statistics. This will provide the number of blobs and size. You could also setup Azure Storage blob inventory. Which would allow you Calculate blob count and total size per container.
Also, it will generate a CSV that you can parse to calculate what you are looking for: Enable Azure Storage blob inventory reports | Microsoft Learn
Alternatively, you can use the Azure CLI and use the below command. You can use the Cloud Shell
at the top right of the Azure portal to perform this.
This will give you a total number of blobs. Also, if you remove the line "-query "length(@)" it will show the actual blob files details.
This method authenticates using Azure AD, so make sure you have at least the "Storage Blob data reader" role on the storage account, below performing the command.
az storage blob list -c "your-container-name" --account-key "your-storage-account-key" --account-name "your-storage-account-name" --query "length(@)" -o table
Can you please cross verify again and let me know the status.
Similar reference threads - https://stackoverflow.com/questions/6861865/getting-blob-count-in-an-azure-storage-container, https://stackoverflow.com/questions/70569511/how-to-get-the-count-of-containers-in-blob-storage-account-using-azure-data-fact, https://learn.microsoft.com/en-us/answers/questions/1435630/how-to-get-blob-containers-details-from-storage-ac
Hopefully this helps you.Please let us know if you have any further queries. I’m happy to assist you further.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.