Find number of cited sources / number of Bibliography entries

Is there a reliable way to determine the number of cited sources with a query or any other way which lets me put that number into a variable? Another way of phrasing the question would be: can I get the count of Bibliography entries?

I can’t directly count them from the BibTeX or YAML files since not all entries in there might be actually cited within the document and the number absolutely has to be accurate in all cases.

I’m aware of the following workaround for getting the amount of sources cited via the @-syntax:

#context query(ref.where(element:none)).len()

but this does not work for sources cited using #cite(). And since #cite() is not locateable I can’t query them.

But there must be a counter which is used for displaying the bibliography entries, but I haven’t found a way to access it from within Typst. (This is where a list of all available elements for counters might help), or is this currently not possible?