SELECT SQL_CALC_FOUND_ROWS column_name FROM table_name LIMIT 1,10; SELECT FOUND_ROWS();
The second query (COUNT() is never used) will tell you how many results there are total, so you can display a phrase “Found 20000 results, displaying 1-10”. Note that FOUND_ROWS does not pay attention to the LIMITs you specified and always returns the total number of rows affected by query.