Show all template type codes and number of templates for each.
create table templates (template_type_code varchar, PRIMARY KEY (template_type_code))
select template_type_code, count(*) from templates group by template_type_code