The enumeration in song of Mary’s joys perhaps goes back to the 14th Century with the Joyes Fyve of the Sloane manuscripts. In collected versions, the number of joys can vary from seven to twelve. The theme of the Joys of Mary is a common one in medieval literature and art. The Five Joys of Mary are mentioned in the 14th Century epic poem Sir Gawain and the Green Knight.
The words appeared on 19th Century broadsides and many versions have been collected, notably in south and west England and the USA, but also in Canada and Northern Ireland. There is also a version in Irish Gaelic entitled Seacht Suailci na Maighdine Muire