Potrebbe esserci un modo migliore per farlo e non l'ho testato in MySQL, ma il seguente funziona in SQL Server 2005:
Select a.language, b.template, count (c.template) as combo_count
from
(select distinct language from tablename) as a
inner join (select distinct template from tablename) as b on 1 < 2 /* this could be cross join, same thing. */
left outer join tablename c on c.language = a.language and c.template = b.template
group by a.language, b.template
order by 1, 2
Ecco i risultati con i tuoi dati di esempio:
au t1 0
au t2 1
au t3 0
en t1 3
en t2 0
en t3 0
ge t1 0
ge t2 1
ge t3 2