Fügen Sie eine Spalte hinzu, total , zum Beispiel:
select t.*
, (select count(*) from tbl where col = t.col) as total
from tbl t
where t.col = 'anything'
limit 5
Wie von @Tim Biegeleisen angegeben :limit Schlüsselwort wird nach allem anderen angewendet, also count(*) gibt immer noch die richtige Antwort zurück.