Sorry for being brutally honest, but you are doing a few stupid things in the way you try to do it. The worst is probably that you try to do this as a subquery when there is absolutely no reason to. But I'll come to that later. If I assume that your first query works and returns something and that you use that as a subquery, then you put in a table in a WHERE in the next query. There is no reason to do that at all, and the result will in best case be strange.
If you defenetley want a subquery you should do like this.
$search_query = "
select *, DATE_FORMAT(appeared, '%W %d %M, %Y') as published_date
from news_stories
where section like '%$section%'
AND unix_timestamp(published) <= unix_timestamp(NOW())
AND ( headline LIKE '%$searchstring%'
OR story_text LIKE '%$searchstring%' )
Order by id Asc";
$sql = "SELECT COUNT(*) AS total FROM (" . $search_query . ")";
$query_count = mysql_query ($sql);
It makes the count from the table that is created and returned from the subquery. But it is a really bad way to do it since there is no reason to have the DBMS work more than it have to, and formatting the date and order the result takes time. A better way to do is this:
$search_query = "
select *
from news_stories
where section like '%$section%'
AND unix_timestamp(published) <= unix_timestamp(NOW())
AND ( headline LIKE '%$searchstring%'
OR story_text LIKE '%$searchstring%' )";
$sql = "SELECT COUNT(*) AS total FROM (" . $search_query . ")";
$query_count = mysql_query ($sql);
Then the database does not have to first order and format the result and after that just throw away that work. But it is still not good, it is easy to do this without any subquery:
$sql = "
SELECT COUNT(*) as total
from news_stories
where section like '%$section%'
AND unix_timestamp(published) <= unix_timestamp(NOW())
AND ( headline LIKE '%$searchstring%'
OR story_text LIKE '%$searchstring%' )";
$query_count = mysql_query ($sql);
That is the right way to do this query. No use for subqueries or unnessecary data that have to be handled. It is possible that you don't need to use unix_timestamp either, but I don't know that for sure.
Note that I create the whole query outside the mysql_query row, that way make it easy to look at the query if there are anything wrong.