I have a seach page in which am showing results based on keyword and custom category search. Issue i am facing is that, I need to display the count of results. I had referred the wordpress documentation and found some codes, for eg :
<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>
But this displays the total search results and I need results count filtered by found in the specified category
showpostsarguments is deprecated as of version 2.1, useposts_per_pageinstead – Eugene Manuilov Jun 6 '12 at 7:10