Count documents with specific name

I have bunch of documents in a single database. I’d like to count only ones that match name starting with “abc_”.
How to do this efficiently? Need sorta analogy of “count(*)” query.
I’m aware of database.count but it just returns everything

Have you tried using the query builder? It has a count function available.