count api
public string count (mixed $ condition = '', array $ params = array ())
So, try passing params as an array to the second parameter of the count method.
ex.
$count_participants = BridgeMeeting::Model()->with('idUserRegistry')->count( array( 'condition' => 'id_meeting=:id_meeting', 'select' => 'id_user_registry', 'distinct' => true, ), array( "id_meeting" => $data->id_meeting ) );
Update: count , which are combined with ->with , do not work properly. Report an error.
Work around:
BridgeMeeting::Model()->with('idUserRegistry')->count( array( 'condition' => 'id_meeting=' . $data->id_meeting, 'select' => 'id_user_registry', 'distinct' => true, ) );
And to debug this attempt to give a constant instead of $data->id_meeting
source share