I don't know what you mean by a descrete number of months in a year. Do you mean an integer number of months in a year?
A non integer number of months in a year would be 11.319, 19.8, 35.42, 429.1082, etc.
An integer number of months in a year would be 11.0000, 19.0000, 35.0000, 429.000, etc.
And it is perfectly possible that as the orbit of a moon slowly changes over time, it might get closer and closer to having an integer number month, pass thorugh having an interger number month, get farther and farther from having an interger number month, and then start having a month length closer and closer to the next (higher or lower) integer number, reach that next integer number and pass it, and so on and so on for have several different integer number month lengths for short periods of time - short periods of time geologically speaking, of course.
And of course you should know that there are at least two different types of months.
Since the Moon's rotation is tidally locked to the Earth, the sidereal month, the length of time it takes for the Moon to turn 360 degrees with respect to distant stars, is equal to the orbital period of the moon around the Earth.
During the days that a sidereal month lasts for, the Earth travels a number of degrees along its orbit around the Sun, and thus the angle between the Sun and the Earth changes with respect to the distant stars. So when the Moon has rotated 360 degrees with respect to the distant stars, the direction to the Sun has changed by several degrees, and thus the Moon has to rotate some more in order to be lined up with the Sun again.
The sidereal month of the Moon is equal to its orbital period and is 27.321661 Earth days long. The synodic or sidereal mnth of the Moon, the basis for calendar months, is 29.530589 Earth days.
The greater the difference between the orbital period of the moon around the palnet is and the orbital period of the planet around the star is, he smaller the difference between the sidereal month and the solar (stellar) month will be.
So if a planet has a longer orbital period or year, and/or the moon has a shorter orbital period, the difference in length between the sidereal month and the stellar month will be smaller.
And apparently Earth's Moon also has other types of months, according to:
https://en.wikipedia.org/wiki/Lunar_month#Types
Your answer claims that it was demonstrated that it is possible for a moon's month to equal its planet's year.
And I think that it is is impossible for the sidereal month of of a moon to equal the year of the moon's planet.
The question and answer linked to seems to indicated that if a moon has two sidereal months in a planet's year it will have only one synodic month.
What orbital period would produce one New Moon (and one Full Moon) each year? What other effects would this produce?
But It may be impossible for a moon to have as few as two sidereal months in a year of its planet, with the sideral month lasting for 0.5 of a year.
Every moon has to orbit its planet farther than the Roche limit, which depends of the realtive densities of the two objects. A moon closer than its Roche limit will be ripped apart by tidal forces. Triton, the large moon of Neptune, is spiriling closer to Neptune and will reach the Roach limit in about 3 billion years. Phobos, the inner moon of Mars, is spiraling closer to Mars and will reach the Roche Limit in tens of millions of years.
And every moon has to orbit within its planet's Hill sphere in order to have a stable orbit around the planet. The less massive the star is, the larger a planet's Hill sphere will be. The more massive a planet is, the larger it's Hill sphere will be. The farther a planet is from its star, the larger its Hill sphere will be.
The radii of the Hill sphere's of various planets are:
Mercury 175,300 kilometers
Venus 1,004,200 kilometers
Earth 1,471,400 kilometers
Mars 982,700 kilometers
Jupiter 50,573,600 kilometers
Saturn 61,634,000 kilometers
Uranus 66,738,100 kilometers
Neptune 115,030,700 kilometers
Pluto 5,992,100 kilometers
Eris 8,117,600 kilometers
The orbit of the Moon has a distance of 384,399 kilometers and a period of 27.321661 days or about 0.0748 Earth years.
The orbit of Deimos, the outer moon of Mars, has a distance of 23,463.2 kilometers and an orbital period of 1.263 days or 0.0018384 Martian year.
The orbit of Sinope, the outermost moon of Jupiter, has a distance of 24,864,100 kilometers and an orbital period of 800.97 days or 0.1848 Jupiter year.
The orbit of LVIII or S/2004 S 26, the outermost moon of Saturn, has a distance of 26,701,600 kilometers and an orbital period of 1,628.99 days or 0.1514 Saturn year.
The orbit of Ferdinand, the outermost moon of Uranus, has a distance of 20,430,000 kilometers and an orbital period of 2,790.03 days or 0.0909 Uranus year.
The orbit of Neso, the outermost moon of Neptune, has a distance of 50,258,000 kilometers and an orbital period of 9,880.63 days or 0.1641 Neptune year.
The orbit of Hydra, the outermost moon of Pluto, has a distance of 64,800 kilometers (from the Pluto-Charon barycenter) and an orbital period of 38.20177 days, or 0.0001737 Pluto year.
The orbit of Dysnomia, the moon of Eris, has a distance of about 37,300 kilometers and an orbital period of 15.736 days or 0.000077 Eris year.
Actually the Hill sphere is not totally safe for objects to have stable orbits.
The Hill sphere is only an approximation, and other forces (such as radiation pressure or the Yarkovsky effect) can eventually perturb an object out of the sphere. This third object should also be of small enough mass that it introduces no additional complications through its own gravity. Detailed numerical calculations show that orbits at or just within the Hill sphere are not stable in the long term; it appears that stable satellite orbits exist only inside 1/2 to 1/3 of the Hill radius.
https://en.wikipedia.org/wiki/Hill_sphere#True_region_of_stability
The outermost moons of Earth, Mars, Uranus, Pluto, and Eris are not only within the Hill radius, but also within half the Hill radius andeven one third the Hill radius of their planets, and have stable orbits.
The outermost moons of Jupiter, Saturn, and Neptune orbit father than one third the hill radius of their planets but less than one half the Hill radius.
There are no known moons of the eight planets and two of the dwarf planets in the solar systems with orbits beyond half of the Hill radius of the planet. The outer moons of the giant planets are beleived to be captured asteroids and other small bodies.
No known moon has a year more than 0.1848 times the year of its planet, though some of them orbit close to half of the Hill radius of their planet.
An article "Exomoon habitability constrained by illumination and Tidal Heating", Rene Heller and Roy Barnes, Astrobiology, Volume 13, Number 1, 2013, discusses the habitability of hypothetical exomoons of exoplanets.
https://faculty.washington.edu/rkb9/publications/hb13.pdf
They discuss the length of a tidally locked moon's day, which of course must be equal to its orbital period around its planet, on page 20.
The longest possible length of a satellite’s day compatible with Hill stability has been shown to be about P∗p/9, P∗p being the planet’s orbital period about the star (Kipping 2009a).
So they say that the longest possible month of a moon with a stable orbit would be one ninth as long as the year of the moon's planet.
And this is their source for that statement:
Kipping, D.M. (2009a) Transit timing effects due to an exomoon.
Mon Not R Astron Soc 392:181–189
https://watermark.silverchair.com/mnras0392-0181.pdf?token=AQECAHi208BE49Ooan9kkhW_Ercy7Dm3ZL_9Cf3qfKAc485ysgAAAtowggLWBgkqhkiG9w0BBwagggLHMIICwwIBADCCArwGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM7fLE5L8VF5vefZGsAgEQgIICjV8plE4Fq-ge41vtVQuOknbY4iz9Pxqbv7hElUqRdfkbs4XfhtxkH9RBmUWhXxulJOlOnYOBzKmyCpSj_KKgd6huMsuUWaOBhhDrctEztFSfzlXigRmDlacDaVmxKNqDjjnYejaa0lbnh5L2PmYYO7g2zlBlUdnN60xLSZiJWX_HntCX4VES5roNgikWfFUUAcC0wfUiB4wCr9HVfs3X7epcDXdINkNc33u1_TOtvRpHPAOxNIYX5rW0bUr5OaI-ZC_ibG3-O4T2hZaM6jViCs6xM69q4dblMlImF78ltALiN9Ud_sNX8oZ6C5mGOZj7U4FVs4beJyb7Rr1SjK7veG1_7LHBQUcxP8WWvftCydYc35cHI49qEbnRM2bEDSmMz-t86yDUudkMNST02_Gy_o99z4D0VVnBot9PmXbI8RHndl1QBKk--iynVsxf7-Qnz8TaaK7tEszl90mr8ilP3EI8LXlm9XP2KeK18ZyszY5syi49ICA0EUHtRGusQHIsXzckG_2klMcwEsfsbY3O6727Aayz2UiQaK1epp1mkhsAFI1doI6mLzwqzBGPQSMM68Bdaxy2lvG9WI7QuqSyg91d6WHcHVjkEqHbETxfxcTycb0l9HAHD4SsSGngxHLlQYlKwmH3NI36bVCw4YHdE7PWkCjlu1FXkQ7kxbMMIblfIe6qZDZeSJgydgn8_MfSwWrxt0KmUXsg1O0N_-SxdpTavoNnjlziozcArMc_4RJp3oZvXXQZqNhqU4De-DNOwsFYwBZlfxFrdBnJfOP2YHlYv8CqiOlKBl9PcSucj6-QMk6jl9f-vzN2ZsqusgQY5gKisIWBnXA5qJAVQ31lZgFMkxjUD1M8DxxkYL9j