select typename,typedir, count(*) as count from dede_arctype group by typedir order by count desc