Prova Thisfound_rows-funktionen http://dev.mysql.com /doc/refman/5.0/en/information-functions.html#function_found-rows