Is there an open database that gives links ICD-10 codes with the prevelance of the diesease they represent?
One realistic way to get what you're looking for is to get a large set of de-identified clinical claims, with ICD-9 codes (there aren't yet many large sets with ICD-10), aggregate to calculate the distribution per specialty, and then use an ICD 9 to 10 mapping to get approximate ICD-10 distributions.
Another option is to consider the fact that the distribution of codes, especially with ICD-10, is such that in every specialty there is a short tail of very common codes, and then (many) codes that almost never happen. Starting with lists of the most common codes per specialty can be a good start to approximating this (I'm assuming you're looking for a-priori numbers to train a classifier/ranker, so approximation is reasonable): http://www.nuemd.com/icd-10/common-codes http://htpnmarketing.com/icd10/resources/top-25-icd-10-codes-by-specialty/
Good luck, and please share if you find a better or more accurate data source.
UK data is coded to ICD-10 so essentially all hospital records will record diagnosis of patients using multiple ICD-10 codes. This, of course, might not be a representative sample of the population as a whole as not every illness results in a hospital admission. And patient-level data is sensitive so you won't get it without good reason, though aggregate data is accessible.
Possibly more useful is mortality data where the ONS releases comprehensive aggregate ICD-10 coded cause of death data as time series here.