If you pay any attention at all to the Olympics, you’ve probably noticed which nation is winning the gold medal for winning gold medals. As of Friday evening, with two days left in the London Games, that would be the good ol’ USA. Our swimmers, gymnasts, runners, jumpers and other athletes have collected 41 golds, and 94 medals overall, putting our athletes atop the standings in both categories.

It’s irresistible to assess and compare national sports prowess via the medal table, and just about everyone does it. Host Great Britain is positively bursting with pride over the performance of “Team GB.” By contrast, Australia, historically an Olympic overachiever, is down Down Under about its subpar performance; the country’s swimming association has begun a formal review to find out what went so terribly, tragically wrong with its team.

National comparisons may be inevitable, but, at least officially, they’re not kosher. The Olympic Charter — essentially its constitution — looks down on this sort of thing. The Olympics, the charter declares in Article 6, are “competitions between athletes in individual or team events and not between countries.”

In fact, during the first two modern Olympics in 1896 and 1900, most countries didn’t even have organizing committees. Participants entered the competition through their athletic club, said Bill Mallon, an Olympic historian. The club winning the most events won a special award.

But that was then. Try telling that now to a few million flag-waving fans or to some 200-plus national Olympic committees, most of which are funded by their citizens’ tax dollars. Try telling it, too, to dozens of advertisers, which have made the Games synonymous with patriotism (and this week’s Olympic sale-a-bration!). Try telling it as well to NBC, which focuses almost exclusively on U.S. teams and U.S. athletes and reports their collective performance each night via medal-count updates (sponsored by McDonald’s, of course).

For that matter, it’s not really clear the International Olympic Committee believes its own charter. If it were serious about the athletes-not-nations thing, the IOC would ban the parade of nations during the Opening Ceremonies and scrap the playing of national anthems during medal ceremonies. It might also consider banning nations altogether and letting the best athletes, regardless of citizenship, compete against one another.

But what fun would that be? Any athlete wearing his or her national colors creates instant identification and natural rooting interest back home, far more so than the arbitrary collection of millionaires who compose any major-league team. National pride is on the line, through the harmless vehicle of sports.

Certainly, America’s current Olympic chauvinism (USA! USA!) is mild compared with Adolf Hitler’s grotesque perversion of the 1936 Berlin Games or the long arc of the Cold War era. For a couple of generations, high jumpers and hockey players weren’t merely athletes; they were proxies for the superiority of the American or Soviet “system.” The U.S.-Soviet rivalry took many forms, most of them ugly, such as the tit-for-tat Olympic boycotts of 1980 and 1984. To this day, the bitterness of that era still lingers; the 1972 American basketball team, which was “robbed” of the gold medal in its game against the Soviets, has refused to accept its silver medal.

This intense competition hasn’t been fully replaced by the rivalry between the two reigning Olympic superpowers — the U.S. and China. For one thing, the Americans and Chinese dominate different sports and rarely face each other in high-stakes matches. But you can still see the outlines of the same old East-West conflict. Just as the Soviets were portrayed on American TV as stoic, Ivan ­Drago-style athlete-bots (until Olga Korbut melted American hearts), the Chinese don’t get many humanizing breaks, either. Bob Costas hasn’t been having them over for many post-game chats, nor is Visa likely to feature them in its golden-tinged commercials anytime soon.

The Chinese look something like our former athletic enemies, too, in the rigid state control of their Olympic development programs. The world’s most populous country has plotted its relentless march up the medal table — China practically doubled its medal haul from 2000 to 2008 — just as carefully as it has managed its currency and export economy. Americans love to be appalled by stories of Chinese sports officials whisking 6-year-olds into gymnastics sweatshops and platform-diving boot camps.

Yet while the American system of Olympic development is free of direct government control and taxpayer subsidy, it is no less centrally planned and driven by boundless heaps of money.

The nonprofit U.S. Olympic Committee organizes and equips our team, but its engine is gassed by NBC and Coca-Cola. Under its current contract with the IOC, the U.S. committee gets a 20 percent cut of the IOC’s global sponsorship revenues, and 12.75 percent of the IOC’s rights deals with U.S. broadcasters. (Do the math: NBC paid $2.2 billion to the IOC for the 2010 and 2012 Games, and $4.4 billion for all the Games between 2012 and 2020.)

In many ways, the Olympic economy almost requires America’s team to lead the medal standings. Without U.S. stars and victories, millions of American viewers probably wouldn’t watch the Olympics. Without American viewers, sponsors wouldn’t pay the big bucks to the IOC and USOC. And without sponsors, U.S. networks such as NBC wouldn’t be spending billions to televise the Olympics.

So ignore the quaint rhetoric in the Olympic Charter. By all means, root, root, root for the home team. Because if they don’t win, well . . . no Games.