Cpagination Find Total Rows With Limit


i use cpagination:

$criteria = new CDbCriteria;

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



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?



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: