code: public static int numRoutes(int version) {
      int count = 0;
      for (Route route : routesList)
        if (route.getVersion() == version)
          count++;
      return count;
    }
docs: Calculates number of routes having the specified version.