Re-numerate selected tracks in iTunes
Try this...

tell application "iTunes"
    set iSel to selection

    set n to 1

    repeat with trk in iSel
        set track number of trk to n        
        set n to n + 1
    end repeat
end tell