Yup. In a calendar year a publisher, or "licensee", could only release five games. No more. It was a rule with its heart in the right place: the great video game crash of 1983 had been largely brought about by a flood of cheap titles, so by seeking to limit the number of games a company could release, Nintendo was trying to avoid the same thing happening again.
But in practice it was a mess. Why should major, established companies be limited to only five games if they had the means to release six, seven or even ten quality titles? They clearly felt they shouldn't be, so workarounds had to be discovered.
Konami came up with the most notorious (and also effective): they simply formed new companies. In 1988, Ultra Games was founded, superficially a new publisher but really just a spin-off of Konami's American operations. The company's catalogue serves to highlight just how silly Nintendo's 5-game rule was, as it contains some of the greatest video games of all time, like Metal Gear, Pirates!, Skate of Die and the TMNT arcade game.
The same thing happened in Europe, where Konami set up Palcom, a publisher doing largely the same thing (though with the awesome exception that it released Parodius, a classic shooter that never saw the light of day in North America).
Effective for the time in the late 1980s and early 1990s, both companies were slowly wound down after the release of the SNES, when Nintendo realised the rule was indeed a little bit much and scrapped it. Ultra was closed down in 1992, and Palcom wound up in 1994.