Cpagination Find Total Rows With Limit

Hi

i use cpagination:

$criteria = new CDbCriteria;

        $pages = new CPagination($profileModel->count());        


        $pages->setPageSize(Yii::app()->params['listPerPage']);


        $pages->applyLimit($criteria); 

i need to know total rows number of query but because of use limit its show the number of limit number.

how can find that?

thanks


$profileModel->count()

Does that ring any bell to you ?:)

thank for reply

it does`nt work correctly and return special number for each query and never change.

oh it`s solved

i must use:

$profileModel->count($criteria);