$_count = $_row["total"];
    $_ex_link = new CExLink();
    if (!empty($search)) {
        $_ex_class = new CExClass();
        $_ex_class->load($_ex_class_id);
        if ($use_user_logs) {
            $ljoin["user_log"] = "user_log.object_id = ex_link.ex_object_id AND user_log.object_class = 'CExObject_{$_ex_class_id}'";
        } else {
            $where["ex_link.ex_class_id"] = "= '{$_ex_class_id}'";
        }
        $ljoin_orig = $ljoin;
        $where_orig = $where;
        $where["ex_class.ex_class_id"] = "= '{$_ex_class_id}'";
        $where = array_merge($where, $_ex_class->getWhereConceptSearch($search));
        $ljoin["ex_object_{$_ex_class_id}"] = "ex_object_{$_ex_class_id}.ex_object_id = ex_link.ex_object_id";
        $_count = $_ex_link->countList($where, "ex_link.ex_class_id", $ljoin);
        $where = $where_orig;
        $ljoin = $ljoin_orig;
    }
    if ($_count > 0) {
        $ex_objects_counts[$_ex_class_id] = $_count;
    }
}
$ex_class = new CExClass();
$where = array("ex_class_id" => $ex_class->getDS()->prepareIn(array_keys($ex_objects_counts)));
$ex_classes = $ex_class->loadList($where);
// Création du template
$smarty = new CSmartyDP("modules/forms");
$smarty->assign("ex_objects_counts", $ex_objects_counts);
$smarty->assign("ex_classes", $ex_classes);
$smarty->display("inc_list_ex_object_counts.tpl");