how can i count data that will retrieved by $dataProvider ? i've tried to use this code,
$dataProvider = new CActiveDataProvider('Model');
$dataProvider->totalItemCount;
In yii2
For total count use
$dataProvider->getTotalCount()
For page count then
$dataProvider->getCount()
Refrence page http://www.yiiframework.com/doc-2.0/yii-data-basedataprovider.html#getTotalCount()-detail