Why do full-length golf courses have 18 holes?

Why do full-length golf courses have 18 holes, and not 20, or 10 or an
even dozen?

Someone gave me this explanation, sounds good but does anyone know if it is true or what the real answer is ?

During a discussion among the club’s membership board at St. Andrews in
1858, one of the members pointed out that it takes exactly 18 shots to polish
off a fifth of Scotch. By limiting himself to only one shot of Scotch per hole,the Scot figured a round of golf was finished when the Scotch ran out.

Very basically, St Andrews evolved into its present 18-hole form, and everybody else followed. Mid-19th century, the R&A of St Andrews set up the 18-hole round as Rule no. 1.

Naturally it’s because they couldn’t call the clubhouse the 19th hole otherwise. If there were 20 holes it would be the 21st hole, and that doesn’t have the same ring to it.

Utter nonsense. Golf fairytale.

It’s 18 holes simply because that’s how many holes St Andrews had when they wrote the rules. Prior to that you had any number of holes in a course.

It’s as simple as that.

Per the St. Andrew’s website:

Well, 10 or 20 holes would be way to similar to the metric system and us U.S.ers would just be far to confused but such a nice round number.