Салам,
Ответ: Зависит от того, когда вы вызываете метод подсчета!
В вашем коде:
$model=Model::query();
$model2 = $model;
foreach ($Entities as $entity) {
//you should save your where between in self $model varriable
$model = $model->orWhereBetween("id",$entity->first_id,$entity->last_id])
}
//$model - object of query builder
$model->count();//After operations and filtering
$model2->count();//Before operations and filtering ( It is equal or more than $model->count() )
Надеюсь, это поможет вам:)