ну если в $model->event->date_from дата в timestamp, то зачем Вы опять пытаетесь получить временную метку через strtotime()?
SELECT `appointment`.* FROM `appointment` LEFT JOIN `event` ON `appointment`.`event_id` = `event`.`id` LEFT JOIN `certification` ON `appointment`.`judge_comitet_id` = `certification`.`id` LEFT JOIN `profile` ON `certification`.`user_id` = `profile`.`user_id` WHERE (`profile`.`user_id`=139) AND (`event`.`id` != 55) AND (`event`.`date_from` >= 1539496800) AND (`event`.`date_to` <= 1539547200) GROUP BY `event`.`id` ORDER BY `event`.`date_to`
SELECT `appointment`.* FROM `appointment` LEFT JOIN `event` ON `appointment`.`event_id` = `event`.`id` LEFT JOIN `certification` ON `appointment`.`judge_comitet_id` = `certification`.`id` LEFT JOIN `profile` ON `certification`.`user_id` = `profile`.`user_id` WHERE (`profile`.`user_id`=139) AND (`event`.`id` != 55) AND (`event`.`date_from` >= FALSE) AND (`event`.`date_to` <= FALSE) GROUP BY `event`.`id` ORDER BY `event`.`date_to`
$appointmentsInDatesCount = Appointment::find()
->joinWith(['event', 'profile'])
->andWhere([Profile::tableName() . '.user_id' => $model->certification->user_id])
->andWhere(['!=', Event::tableName() . '.id', $model->event_id])
->andWhere(['>=', Event::tableName() . '.date_from', strtotime($model->event->date_from)])
->andWhere(['<=', Event::tableName() . '.date_to', strtotime($model->event->date_to.)])
->groupBy(Event::tableName() . '.id')
->all();
Простите, что так сильно придираюсь. Важно точно написать ваше предложение. Потому что у меня не работают много примеров!