Such statements are not to be intended in the "scientific" sense. They are marketing materials and are not claimed to be representative of all dentists.
Stock phrases such as "Recommended by nine out of ten dentists" in commercials for non-prescription consumer healthcare products such as Sensodyne toothpaste are devised by the parent company's Global Planning team based on large marketing surveys conducted by designated market research firms such as IPSOS. Analysis by the brand's agency partner into Sensodyne's advertorials revealed that when dentists explained the benefits of its toothpaste, it helped growing the sales of the product. Robert J. Morais in the book Advertising and Anthropology: Ethnographic Practice and Cultural Perspectives states, "I was a member of an advertising agency team that developed a highly inventive advertising strategy intended to ignite Sensodyne sales. The strategy was created through a leap of insight that led to repositioning Sensodyne to dental professionals and consumers."
Per tvtropes, the sample size and population mentioned in the phrase can be anything from having a panel of only ten doctors asked (and may be cherrypicking doctors until they get the result they want). This biased research might be the fact which the advertiser wants to portray as the "research statistics" for their products. Confirmation bias which is the tendency for people to search out statistics that support their preconceived notions and ignore other negative statistics that do not confirm to their belief seems to be used by advertisers for their market advantage. Also sometimes, appeal to authority which is a person noting his own occupation as a legitimate argument to get people to take the commercial seriously is also used by advertisers for their own profit and if someone does inquire about the dentists they surveyed, the toothpaste company could also just say that they cannot reveal that information on the grounds of confidentiality.
The whole business of showing percentages to people in advertising is mainly for the market advantage of the product when compared to similar items. Also relative measures are more likely to be understood accurately, and thus are less likely to be used in advertising. Studies by researchers in 2009 show that even when consumers can directly experience the relevant products and the specifications carry little or no new information, their preference is still influenced by specifications that are self-generated and by definition spurious and specifications that the respondents themselves deem uninformative.
Sensodyne was first made available in 1961 by Block Drug. It has rapidly grown globally and become the dentists’ sensitivity toothpaste of choice in many markets since GlaxoSmith-Kline’s acquisition of the brand per Ipsos Healthcare Professional Mouth Care full year 2010 survey. In 1993, the Advertising Standards Authority investigated ‘advertorials’ from Sensodyne against the background of a 47% growth in the use of this technique.
Per Cecil Adams of straight dope, the original instance of this phrase comes from the Warner-Lambert Company, makers of Trident sugarless gum who commissioned a market research firm to survey dentists in July 1976. The research firm team came up with a list of 1,200 dentists who were supposed to represent a cross-section of their profession. The dentists were asked what they recommended to their gum-chewing patients- sugared gum, sugarless gum, or no gum at all. Sugarless gum recommended percentage was 85 percent and hence from then on sugarless gum commercials have said, "Sugarless gum is recommended by four out of five dentists for their patients who chew gum."