Stefan Richter mentioned it might make sense to provide two versions: exact count and approximate count. For some state backend (likes rocksDB), it may be much cheaper to get approximate count.
exposing as metrics would be ideal.
Additionally, it will also be useful to get the total count of timers, which are also stored in state backend. Stefan mentioned timers are just a different namespace in state backend (e.g. column family in rocksDB). So it will be very useful if the metrics have namespace tag.