Mysql Count Filas devueltas

select count(*) from (select * from foo) as x;
Powerful Penguin