I'm currently building out a site using Magento 1.7 where the total number of products displayed in a category is displayed in the sidebar (template/category/layer/view.phtml in the theme directory). The code I have to display this value at the moment is as follows:
<div class="products-total">
<?php if (Mage::registry('current_category')) { ?>
<?php $_category_detail->getName();?>
<?php $_category_detail->getId(); ?>
<?php $products_count = Mage::getModel('catalog/category')->load($_category_detail->getId())
->getProductCount();
?>
<?php echo $products_count,' products' ?>
<?php } ?>
</div>
However, as it simply pulls the current category total products value, it doesn't account for filters. How would it be possible to show the filtered products total?