title: How can I get the review count on review's list.phtml in Magento 1.8?
body: <p>How can I get the review count on review's list.phtml?</p>
  
  <pre><code>frontend\base\default\template\review/product/view/list.phtml
  </code></pre>
  
  <p>I get an error when I use this code in this page,</p>
  
  <pre><code>&lt;?php
  // Get the number of reviews of the product on the product page.
  $storeId    = Mage::app()-&gt;getStore()-&gt;getId();
  
  $summaryData = Mage::getModel('review/review_summary')
  -&gt;setStoreId($storeId)
  -&gt;load($_product-&gt;getId());
  
  /* @var $summaryData Mage_Review_Model_Review_Summary */
  
  /*
  
  array(
  ['primary_id'] =&gt; 147
  ['entity_pk_value'] =&gt; 166
  ['entity_type'] =&gt; 1
  ['reviews_count'] =&gt; 1
  ['rating_summary'] =&gt; 80
  ['store_id'] =&gt; 1
  )
  */
  //var_dump($summaryData['reviews_count']);
  ?&gt;
  </code></pre>
  
  <p>error,</p>
  
  <pre><code>Fatal error: Call to a member function getId() on a non-object in 
  </code></pre>
  
  <p>While the count on <code>frontend\base\default\template\review/product/view/count.phtml</code> will always return  <strong>empty</strong></p>
  
  <pre><code>&lt;?php if (!empty($count)):?&gt;
      &lt;a href="#customer-reviews" class="nobr"&gt;&lt;?php echo $this-&gt;__('%s Review(s)', $count) ?&gt;&lt;/a&gt;
  &lt;?php endif;?&gt;
  </code></pre>
  
  <p>Any idea why?</p>
  
  <p>I have code in my catalog.xml's <code>&lt;catalog_product_view translate="label"&gt;</code>,</p>
  
  <pre><code>           &lt;!-- adding review to the product page --&gt;
              &lt;block type="page/html_pager" name="product_review_list.toolbar"&gt;
                  &lt;action method="setLimit"&gt;&lt;limit&gt;2&lt;/limit&gt;&lt;/action&gt;
              &lt;/block&gt;
              &lt;block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml"&gt;
                  &lt;block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" /&gt;
                  &lt;block type="review/form" name="product.review.form" as="review_form"/&gt;
              &lt;/block&gt;
              &lt;!-- adding review to the product page --&gt;
  </code></pre>