Number of pinned files in a cluster

How can I find the number of pinned files in a cluster or a node? There is a command to list pinned files, but it just hangs for large number of files.
How can I get count of the number of pinned files in a cluster or a node?

I’m afraid waiting for ipfs-cluster-ctl pin ls to return and counting is the only way. It does return eventually.

What is your usecase for this information though?