title: Yii : how to count records in a model?
body: <p>I have following code to fetch data from a model. </p>
  
  <pre><code>$notifyModel = Notification::model()-&gt;findByAttributes(array(
                    'user_id'=&gt; Yii::app()-&gt;user-&gt;uid
                 ));
  </code></pre>
  
  <p>Now I want to count the number of rows fetched. 
  Neither <code>$notifyModel-&gt;count()</code> work nor <code>count($notifyModel)</code>.
  It is very simple but googling did not help.</p>