Please change to: 
"Cannot use "having" with bound params in a CActiveRecord::count()"
or something similar.