I have been reading a bunch of older questions here, and some of them are questioning the importance of Slughorn's memory in HBP, and I feel for good reason. The only explanation the story gives that the memory is important, is because it confirmed for Dumbledore that Voldemort wanted to make seven horcruxes. But the older questions here make good points. By that time Dumbledore already knew Voldemort had more than 1 horcrux, he possibly suspected Voldemort already had at least one horcrux by the point in time seen in Slughorn's memory, Voldemort might have been lying to Slughorn about this intentions to have seven horcruxes, he might have made more than seven just to be safe, he might not have had enough time to make anywhere close to seven, and so on. There were a number of things that could have been wrong about their conclusions from Slughorn's memory. In the end it even turned out that Voldemort finally ended up with an eight part soul, because he had no idea about the one that latched onto Harry. As far as story development goes, there were any number of other ways the story could have introduced the readers to the concept of Voldemort wanting a seven part soul, rather than providing us with the complicated side plot of Slughorn's tampered memory. If nothing else, Dumbledore could have just "guessed" that Voldemort would want seven horcruxes, as it has been implied numerous times in the story that his guesses are correct.
Given all this, was there any indication in the story, up to that point, of there being any significance to the number seven, or if having seven of anything made it magically significant/powerful/anything? I am specifically looking for canon, in universe, book answers. If there are any later explanations in author interviews or later publications, and if there is anything explained in the movie canon (keep in mind I am considering movie canon separate from book canon), it would be interesting information and you can include them in the answer, but I am specifically asking whether in the story, before the scene of Voldemort asking Slughorn 's opinion on seven horcruses, if any magical properties of seven have been explained. talked about, or shown directly.