Maybe I am making this too simple, but isn't
rank = 6 - [Primetot]?
5 to 1
4 to 2
3 to 3
etc.
At least, that is what it looks like from the data you listed.
However, I think all you need to do is sort by Primetot in Descending order. Then, all of your 5's are listed first, your 4's are...