According to a Bloomberg article:
"First-place winners get gold-plated medals that are 92.5 percent silver. The second-place prizes are also 92.5 percent silver, while the third-place bronze medals are mostly copper. The Olympic medals weigh about 500 to 556 grams, meaning the metal in the gold awards are valued at about $537 based on yesterday’s closing prices. The silvers are worth about $300 and the bronzes about $3.40."
See Olympic Champs Wear Old Trinitrons as Teck Turns Junk to Medals. Applying these values to the medals won by all the countries, Canada ranks first. But, if you reverse the outcome of the gold-medal game in hockey, each country changes by $237, the difference between gold and silver. Then the US has 9614 and Canada has 9398.
If you count every medal won by a country, including one for each player on a team, like every hockey player, the next table has the results. Carl Bialik of the WSJ forwarded this NBC site which had the data. The table below is different from the one I posted yesterday. For some reason when I copied and pasted the data from the NBC site into Excel, more information got carried over than appears on the screen. Some data was double counted. So here is the revised table.