Start with: https://en.wikipedia.org/api/rest_v1/page/html/List_of_Olymp...
Run this js one-liner: [].slice.call(document.querySelectorAll('table[typeof="mw:Transclusion mw:ExpandedAttrs"] tr td:nth-child(n+2) > a:nth-child(1), table[typeof="mw:Transclusion mw:ExpandedAttrs"] tr:nth-child(3) td > a:nth-child(1)')).map(function(e) { return e.innerText; }).reduce(function(res,el) { res[el] = res[el] ? res[el] + 1 : 1; return res; }, {});
The result is an object with the medalists as keys, and the count as values. JS objects are unordered so sorting is left as an excercise for the reader.