Code to Show the Number of Search Results Found in WordPress-
Display the number of search results found in your WordPress search results page by adding the following line of code to your theme’s search.php file-
<h2 class="pagetitle"> Search Result for
<?php
/* Search Count */
$allsearch = new WP_Query("s=$s&showposts=-1");
$key = wp_specialchars($s, 1);
$count = $allsearch->post_count;
_e('');
_e('<span class="search-terms">');
echo $key;
_e('</span>');
_e(' — ');
echo $count . ' ';
_e('articles');
wp_reset_query();
?>
</h2>