It doesn't work like that any more. If the airline has overbooked Y (NW and UA do this all the time), they will upgrade based on an algorithm which primarily takes into consideration elite status and fare basis.
Upgrades in Japan are generally done by the gate agent, not the check-in counter, as well. You might want to check the forum for the airline you are planning to fly for more information on this topic.