Prøv Thisfound_rows-funktionen http://dev.mysql.com /doc/refman/5.0/da/information-functions.html#function_found-rows