Count row of a table based on condition.
App::InformationSet(NAME)->countEntry(CONDITION);
Return integer value of row count.
For example:
$cnt = App::InformationSet('blogpost')->countEntry("category=2");
$cnt = App::InformationSet('blogpost')->countEntry();
echo $cnt;