Vous pouvez utiliser une sous-requête pour supprimer les doublons :
select department_id, count(*),
listagg(manager_id, ' | ') within group (order by manager_id)
from (select distinct department_id, manager_id
from employees
) e
group by department_id