I am developing a crawler.It is downloading all connectedlinks to a specified url.but i want to sort those connected links on the basis of integer value assigned to it.

for eg(i have calculated no. of connected links to each seperate links but unable to sort links on the basis of those no.s)