This would work in SQL server and I don't think there is anything DBMS specific in there so this should work
select f.DesPrefettura AS desPrefettura,
count(case when a.flagPrefetturaQuestura=0 then a.idAccordo else null end) AS tot01,
count(case when a.flagPrefetturaQuestura=1 then a.idAccordo else null end) AS tot02
from ACCORDO a
inner join PREFETTURA f on f.idProvincia = a.idPrefetturaSottoscrizione
GROUP BY f.DesPrefettura
ORDER BY f.DesPrefettura