Fixing for php5.3, collecting count by route type