you'll see this written many many many times (sfmatch as well as the nrmp both have hypothetical examples as to how the match works)
and then you'll hear the whispers and the rumours.
the reality is: rank the programs in the rank order that you would like to be at. all the factors that come into it are different for diff people (e.g. some ppl want to match in a certain geographic area, others want to match in a certain sized program, ...others just want to match 😉
seriously though, just rank them in order of your preference. DO NOT TRY TO PLAY THAT BS GUESSING GAME, anyone can match at their number 1 program if it's not a competitive place (i.e. a place looking for warm bodies w/ a Dr. in front of their names).
you cannot predict how the PDs/selection committees will rank you, so don't even try. just figure out where you want to be and leave your fate to that magical black box called the algorithum