A possible solution written in arcpy Python based on @blah238's solution above. If you wanted to stay in a model builder environment, you could just take the expression from the CalculateFieldManagement line and use that in model builder. Just note the extra setting of -1 and 0 to the original field in case the input is a shapefile.
import arcpy
import sys
def watershed_counter(watershed_lyr, calc_attribute):
current_count = int(arcpy.GetCount_management(watershed_lyr).getOutput(0))
assert current_count == 1, "Too many features selected!"
watershed_value = 0
arcpy.AddMessage("Calculating base watershed")
#We calculate to -1 as if base file is shapefile it uses 0 instead of Null
#as placeholders for no data, and that'a where we want to start the
#watershed count
arcpy.CalculateField_management(watershed_lyr, calc_attribute, -1)
while watershed_value >= 0:
arcpy.AddMessage("Selecting new watersheds")
arcpy.SelectLayerByLocation_management(watershed_lyr, 'SHARE_A_LINE_SEGMENT_WITH', watershed_lyr)
new_count = int(arcpy.GetCount_management(watershed_lyr).getOutput(0))
if current_count == new_count:
watershed_value = -1
arcpy.AddMessage("No more watersheds")
break
else:
watershed_value += 1
arcpy.AddMessage("At watershed level %i, %i new watersheds found" % (watershed_value, new_count - current_count))
current_count = new_count
data = {"val": watershed_value, "field": calc_attribute}
arcpy.CalculateField_management(watershed_lyr, calc_attribute, "%(val)i if !%(field)s! is None or !%(field)s! == 0 else !%(field)s!" % data, "PYTHON_9.3")
arcpy.AddMessage("Setting base watershed to 0")
arcpy.SelectLayerByAttribute_management(watershed_lyr, "NEW_SELECTION", " %s = -1" % arcpy.AddFieldDelimiters(watershed_lyr, calc_attribute))
arcpy.CalculateField_management(watershed_lyr, calc_attribute, 0)
if __name__ == '__main__':
try:
watershed_counter(*sys.argv[1:])
except Exception, e:
arcpy.AddError(e)
sys.exit(e)
Note that each iteration of the loop in this solution is likely to take a longer amount of time as the size of select by location increases in complexity based on number of features, as well as the number of features to be calculated increasing.
Lastly if you're interested in having multiple possible starting points (ie, shortest destance), remove the assert in the script.