Fixes #1796: separate count criteria in CActiveDataProvider.

Fixes #1796: separate count criteria in CActiveDataProvider.