Miai counting - ratio explanation
You really must count something during a serious ko fight, if only to check that the overall position is so one-sided that you can ignore any threat. Global counting of the game is required for intelligent play.
When introducing actual numbers into discussions of localised sequences, one has to get straight the possible scale or counting conventions. This can't be done without a little careful thought. You can skip the rest of this page, or read another treatment (deiri counting, miai counting), if it turns out that you don't like my style of explanation.
There are actually three concepts one needs, related in such a way that one can define the third in terms of the other two. Local tally simply counts the balance of stones played or added during a local sequence. So-called deiri or swing counting can serve as the second. Exhibit a local situation S, with rival outcomes after Black and White plays; and count the points difference that makes as best one can.
That is, we have to hold in our mind two positions, corresponding in tally to SB... and SW... with a few stones added, and differing in value to the players by a measurable amount, called the swing, or traditionally the deiri count. We can make the definition
miai count x tally difference = deiri count. 
Therefore, as long as the tally difference (difference in the number of additional black and white stones) isn't zero, the miai count is deiri count/tally difference and represents how hard the added stones work in the comparison of positions. The miai count is the number telling us per play how much Black or White gain by investing in this part of the board. This is valuable information if it is available, even approximately.
Miai counting for straightforward gote plays comes to comparing SB and SW results (Black takes gote, versus White takes gote) and dividing the swing made by the tally difference, two. Therefore what is ordinarily called a 12-point gote endgame move is also properly treated as a six-point play, miai counting. It is miai scores that compare directly.
One-sided sente plays correspond in this equation to tally difference equal to one: if an endgame play is Black's one-sided sente, you should compare positions starting from S which are like SBWBW...BW with positions SW in which White prevents Black carrying out the sente continuation. The tally difference is therefore one play by White. So, for one-sided sente plays, no need to state the convention used. For double sente plays, the miai value isn't computable because the tally difference is zero. Those correspond in practice to urgent and volatile situations that both players covet.
Pedantic note about scoring method: Chinese-style (area) scoring will give miai counts that are consistently higher by one than Japanese-style (territory) scoring. Evidently that makes no difference when miai counts are compared to see which is larger. Deiri counts will change therefore according to the tally difference. Unless a play is of small value or a very precise count is required, it is safe enough to disregard differences between methods. Of course if you insist on exactness you must specify a method.
The traditional names 'deiri counting' and 'miai counting' are often found unintuitive, not least by this author.
It could be that two moves are only truly miai when they have the same miai value. In the end game, this means that they literally cancel each other out. In the middle game, the term is used a little more loosely. - Bildstein
Lightly adapted from http://gobase.org/studying/articles/matthews/ko/part6/ .
 In the form, Miai value = swing / tally, if swing is measured in points, and tally is measured in stones, Miai value is literally points per stone. The area with the largest miai therefore is the area where your stone will get you the most points. I feel like this point ought to be emphasized. Maybe in the main article as well?
erikpan - upon reading this last footnote, the whole idea of miai counting fell into place for me; so thanks for that - I agree, you ought to emphasize that in the main article because it's a nice way of putting it :)