fixed sorting bug in sortByModelMatches to ensure sorting both on count and id - avoid cross browser differnces in potentially unstable sort algorithms