Traditionally medal counts just add up all the medals won by a country and sort from most to least and rank the countries accordingly. And then when they rank the countries, if groups of countries share a ranking, they will all get the same rank, but the next country below them will get a ranking out of sequence. For instance, Italy and Japan each are tied in 17th with 2 medals and the next country after them is ranked 19th.
I don't like this method of medal counts and ranking. So I created my own medal count and used a different ranking system. I award teams 3 points for gold, 2 for silver, and 1 for bronze. I call this their medal score. I also rank them using a system that keeps the rankings in sequence. So using the example above, Italy and Japan might be ranked 17th, but the next country would be 18th.
I will try to update this at the end of each olympic day, but check the "updated on" date and time to be sure.