$areas = Area::select('areas.*', DB::raw('count(area_id) as connections')) ->leftJoin('object_areas', 'object_areas.area_id', '=', 'areas.id') ->groupBy('areas.id') ->get();