I am displaying listing page with products. And I applied a custom filter to filter out the products.
$pro2 = $this->getLoadedProductCollection();
$_productCollection2 = $pro2->addAttributeToFilter('default_sort_value', 'Type1')->setPageSize(8)->load();
$protype1count = $_productCollection2->count();
To show count or products I used:
Here initially through,$this->getLoadedProductCollection() I get All products and then I filter it using.addAttributeToFilter() It shows limited products actually. By this I mean it filters out to show limited products related to criteria.
But instead of showing filtered count, it shows the count of page size, it doesn't show count after filtering by criteria.
Has anyone Idea what I am missing in the code to get the correct count.