Power Grid deluxe - Winning Condition
It's the number of powered cities you are actually supplying. Taking a look at the rules you quoted (p. 10, Winning the Game), I am emphasizing a few phrases:


  In the following Phase 5 (Bureaucracy) players do not earn money for
  powering cities. Instead, they check to see which player supplies
  electricity to the most cities in his network using the resources and
  power plants he has. This is the number of cities he normally earns
  cash from during this phase. This player that can power the most
  cities wins the game!


So, it's evident that you follow the usual procedure of powering cities, but instead of earning money, you just count how many you powered. And what's the "usual procedure" for powering cities? Rulebook, p. 8, "Bureaucracy":


  A player may choose (or only be able) to supply fewer cities than he
  has in his network. The player is paid only for the supplied cities.
  If a player produces more electricity than he has cities in his
  network, the surplus is wasted.


Therefore, in your example, assuming that all players have adequate resources: (I am rephrasing it to avoid confusion and adding a 3rd player)


  P1, 20 capacity, 12 cities connected; P2, 15 capacity, 13 cities; P3,
  14 capacity, 17 cities


P3 wins! The game ends because P3 has built 17 cities, the number required to trigger the end of the game in a 3-player game. Even though P1 has a capacity of 20 and P2 has a capacity of 15, their scores are 12 and 13, respectively. On the other hand, even if P3 has 17 cities, her score is 14, therefore she wins the game.

What happened in the example? Apparently, P1 and P2 spent too much money on Power Plants and didn't have enough money to connect extra cities. Therefore, P3 ended the game, as she was supplying one more city than her opponents. You can win with less or more than 17 cities (the number to end the game in a 3-4 player game). One more than your opponents is enough.