title: magento product count for attribute
body: <p>how to show product count on attribute?</p>
  
  <p>code/core/Mage/Catalog/Block/Category/View.php</p>
  
  <pre><code>public function getAllManu()
  {
    $product = Mage::getModel('catalog/product');
    $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
                -&gt;setEntityTypeFilter($product-&gt;getResource()-&gt;getTypeId())
                -&gt;addFieldToFilter('attribute_code', 'product_properties');
    $attribute = $attributes-&gt;getFirstItem()-&gt;setEntity($product-&gt;getResource());
    $product_properties = $attribute-&gt;getSource()-&gt;getAllOptions(false);
    return $product_properties;  
  }
  </code></pre>
  
  <p>view.phtml</p>
  
  <pre><code>&lt;select class="form-control" onchange="if (this.value) window.location.href=this.value"&gt;
    &lt;option&gt;Select&lt;/option&gt;
    &lt;?php foreach ($this-&gt;getAllManu() as $product_properties): ?&gt;
     &lt;option value="&lt;?php Mage::getURL() ?&gt;catalogsearch/advanced/result/?product_properties[]=&lt;?php echo $product_properties['value'] ?&gt;"&gt;&lt;?php echo $product_properties['label'] ?&gt;&lt;/option&gt;
    &lt;?php endforeach; ?&gt;
  &lt;/select&gt;
  </code></pre>