Se si tratta di una tabella di un DB
puoi eseguire questa query:

select count(*) from tabella
where condition.

Ciao