rewrite parseUriCounts code using Model