In which case, there is no need perform a count. Do a simple `SELECT 1 AS data_exists` and use sql_query_limit  with a limit of 1 instead of sql_query.