Let's get this one out of the way. As Novum mentions in his complete guide, the love spell depicted in the film is very much based on real traditions.
Midsummer is by all accounts a fertility holiday, related to crops and life and rebirth, and young women calling on the mystic powers to find them a man is certainly part of it. As Schön (1989) puts it - “Midsummer was the holiday of erotics before all else” (p. 78)
Bodily fluids have been used in various magical and spiritual rituals for thousands of years, and a recurring phenomenon in Scandinavian folklore, not least in Hälsingland, is women putting their pubic hair, genital sweat, discharge or menstrual blood in food and drinks to serve to the man they’re hoping will fall in love with them (Kuusela 2017 p. 19-20)
This could be a stranger or a girl’s actual husband who has been growing distant lately. Fun variations include making waffles with pubic hair or dripping some menstrual blood into a cut apple. Just remember, if you try this at home - make sure the right dude eats the apple! If the wrong man eats it, he’s gonna be the one who falls madly in love with you. (Schön 1996 p. 17-21)

The first half of the love spell tapestry brought back memories of what I learned as a child - on Midsummer’s night, a girl should pick a certain number of different flowers and put them under her pillow, and her future husband will appear in her dream. There are a lot of regional variations to this one, from the number of flowers to how they should be picked. In some versions the girl has to jump over a new roundpole fence for every flower she picks, a practice mentioned in the script as part of the May queen competition. Other recurring things include picking them backwards, in the nude and in silence - these are all hallmarks of magic and rituals in Scandinavian peasantry, somehow reversing or deviating from the way you normally do things. (Kuusela 2017 p. 12, Schön 1989 p. 75, 80)

Silence is something Schön particularly emphasizes when talking about the love spells, so the fact that Maja doesn’t utter a word in the movie until after the deed is done serves not only to mystify her character but to illustrate that she takes this ritual very seriously. In the director’s cut she’s approached by Christian but is reluctant to talk to him and Ulla swoops in to speak for her.
The number of flowers to pick is usually one of the magic numbers - 3, 7 or 9. Raised in rural Västmanland, I was personally taught it was nine flowers, and that is also the number shown on the love spell tapestry and the recurring magic number in the movie.
References
Kuusela, T. (2017), ”Kärlek i Hälsingland. Folklig spådom och magi för att finna och binda kärleken”. I: Hälsingerunor 2017
Schön, E. (1989) Folktrons år : gammalt skrock kring årsfester, märkesdagar och fruktbarhet. Stockholm: Raben & Sjögren.
Schön, E. (1996) (B) Älskogens magi. Folktro om kärlek och lusta, Stockholm. pp. 17-21