Hi team,
While developing an app, I discovered that the Files API does not expose any way to retrieve the total number of files in a store. Unlike resources such as products, collections, or customers, the files resource does not provide a connection‑level count field (e.g., productsCount), nor a connection that supports totalCount.
As a result, the only way to get the total number of files is to paginate through the entire files connection.
For stores with ~10,000 files this takes 20+ seconds, which is unacceptable for synchronous app flows.
Bulk operations are not a good alternative because they add unnecessary overhead for small stores and introduce latency when only a simple count is needed.
A dedicated filesCount query (similar to productsCount) or adding a connection with totalCount for files would solve this problem and significantly improve performance for apps
working with media.
Thanks for considering this enhancement.