Kind of depends on how many years and counties you have. If not too many, might be best to use a dictionary and populate it with the possible lookup values to extract.Another way might be to:create a new field for the sequencnumcreate a new field for the new iditerate through and append to a list your years and another list for counties (by number)Then something like:
for year in years:
for county in counties:
lyr.definitionQuery = "years" = year AND "counties" = county # I know this isn't valid syntax, just a basic outline but would only show features in one year and county
maxValue = arcpy.SearchCursor(infc, "", "", "", "sequencnum D").next().getValue(sequencnum) # this would grab the max sequencnum if exists so you know what to start with. if no exist, then set to 1
then do your update cursor and update the newid field to (str(year) + "-" + str(county) + "-" + str(sequencenum)) # may have to .zfill to get the zeros right.
something like that should "filter" the table to just one year and county at a time, then you can do the sequence number(s), then it will move onto the same year, next county, then after that year, it will do next year, first county and so on.R_I see Stacey posted while I was writing this. Both methods should work, but I think Stacey's is more elegant, and probably execute faster.