code: static int countInPeriod(DayOfWeek dow, DayOfWeek dow0, int nDays) {
  		//two cases:
  		//   (1a) dow >= dow0: count === (nDays - (dow - dow0)) / 7
  		//   (1b) dow < dow0:  count === (nDays - (7 - dow0 - dow)) / 7
  		if (dow.getCalendarConstant() >= dow0.getCalendarConstant()) {
  			return 1 + ((nDays - (dow.getCalendarConstant() - dow0.getCalendarConstant()) - 1) / 7);
  		} else {
  			return 1 + ((nDays - (7 - (dow0.getCalendarConstant() - dow.getCalendarConstant())) - 1) / 7);
  		}
  	}
docs: Counts the number of occurrences of a weekday in a given period.
  @param dow the weekday
  @param dow0 the weekday of the first day of the period
  @param nDays the number of days in the period