You're stuck in the polling booth. You have before you a list of candidates. The voting system in force is one of preferential voting where all the boxes need a number entered (your first choice being indicated with a "1", your second choice indicated with a "2", and so on). You really don't care who you vote for.
Whoever is listed first on the page gets vote #1, and whoever is listed second gets vote #2, and so on.
In Australia (one of the few countries to use preferential voting), "donkey voting" isn't all that common. The order of candidates on the ballot is randomised prior to printing, so no party can claim to be disadvantaged, anyway.
On a whim one evening before dinner, I took up this problem. Took a few minutes to write down the design, including honoring ties and skipped numbers, and leaving open the possibility of "lasts" (so you can vote " ", "2", "1", "2", "8", " " in a six-candidate instant-runoff-vote election, number of winners irrelevant).
Key is to count pairwise preferences across all ballots. For each ballot, fill in the holes in the numbering and normalize. The above example is equivalent to 4 2 1 2 6 4, which produces the preferences AE BA BE BF CA CB CD CE CF DA DE DF FE.
''For 1 seat elections this is very similar to DeCondorcet. Where there are multiple seats up, you will lose proportionality. For discussion of a possible solution that keeps proportionality, see http://www.electoral-reform.org.uk/sep/publications/votingmatters/nov00a.htm#Ordered --JoeOtten''