And another note:
If you have ArcGIS 10, you can use the ModelBuilder Iterator tool, Iterate Feature Selection or Iterate Row Selection, to loop through selections defined by the Group By Field, in the case above this would be NEAR_DIST. Then for each selection use Calculate Field with the expression: %n%+1 to assign the unique iteration value starting with 1 in the added field. It is pretty simple.