5.8 in the rules explains it all:
5.8 PEACE DIE ROLL
The game ends on a Peace die roll greater than or equal to “6”.
Each player, in Order of Movement, may add or subtract one
to/from the upcoming Peace die roll once this Turn by reducing
the Hand replenishment of a specific Power he commands for the
next Turn by one card. A Peace die roll is then made. A Power
due only a minimum draw (14.32) in the next Turn, or which is
a Subject Neutral, may not influence the Peace die roll. A Proxy
Power may never influence the Peace die roll. Each player
can spend only one card regardless of the number of Powers
Example: In a two-player game, if Austria were next in Order of
Movement, the Coalition player could spend an Austrian card, or a
Russian card, or wait to see what France does, before deciding to
spend a British card.
5.81 VICTORY: The number of Keys Controlled by each nation is
indicated on the Key Control Track. As nations lose or gain Keys,
their Key markers move left or right on the Track accordingly. A
player gains a point for each Key gained and loses a point for each
Key lost by his Player Power(s). Key status of Neutral Clients,
Prussia as a Pact Ally, and Minor Pact Allies is not considered.
At game end, each player also gains a point for each surviving
Minor Pact and Player Power Resource he has. The player with
the most points (not necessarily the player with the most Keys)
wins. Ties are won in reverse Movement Track Order.
Example: If France has 14 Keys, no Resources and no Minor Pacts,
they would have one point since France starts with 13 Keys. Any other
player with one point would win the tie, since France is the first nation
on the Movement Track.
5.82 AUTOMATIC PEACE: Regardless of the Peace die roll or
the game Turn, the game ends (after conquest resolution, 15.2)
if France is conquered or Submits (or immediately in case of
French Capitulation). It also ends at the end of Turn 5 (Turn 6
if Napoleon Abdicates) or any Conquest phase (5.7) in which
either Britain or Russia is a Subject Neutral and France has six or
more points. Victory is always determined by points as per 5.81 regardless of the condition that causes the game to end.