Fix for method count without specifying $criteria but with the condition in defaultScope

...
	/**
	 * @return array
	 */
	public function defaultScope()
	{
		return [
			'condition' => [
				'sameField' => true
			]
		];
	}
...

MyModel::model()->count();