The first two verses of 1 Samuel 2 set the theme, exclaiming in joy the salvation supplied by GOD almighty through his rock, the strong's number h344 salvation yeshuw 'ah.
All of this complicated speculation and conjecture, double counting, retribution and Jewish scholars intellectual minutia over Hannah's prophecy in 1 Samuel 2: 5, about a childless woman who would bear 7 children.
What they disregard,in addition to rejecting the miraculous, is the childless Mary who according to Mat 13:55 bore Christ, then four sons, James, Joses, Simon, and Judas,(in Mark 6:3 Juda), 4 half brothers to Jesus, and two daughters, (at least), half sisters to Jesus. That makes at least 7 children for Mary.
Jesus was known in the community as the son of Joseph. That He was the first born is implied by there being nothing indicating he was subject to the authority of any of his brothers, meaning he was the eldest, so the kids could not have been Joseph's by a previous wife.
Also, Joseph and Mary took him to the temple when He was 12, and temporarily lost Him there when they left for home without Him in the group. Apparently they had no elder children to be watching over Him then.
That He was the eldest is also confirmed at the cross when He assigned the care of his mother to the Apostle John instead of one of His half brothers, who would have challenged the usurping of a superior position in the family if there had been an elder man.
There are 463 mentions of the word seven in the KJV. Only 2 are found mentioning a child count of 7. Job had seven sons and three daughters, but he had them twice for fourteen and six.
Jer, 15:9 mentions judgment coming to Israel and even if a woman had seven sons, she would lose them all in the coming destruction. Not likely saviors.
So Hanna speaks of a coming savior, yeshuaw 'ah in 1 Sam 2: 1 and a childless woman having seven children in vs 5 in the middle of making all things right.
Mary had five sons, and at least two daughters.
When Hanna gave over her boy Samuel to God, and besides giving glory to God for His gift of her son, it seems she was, unknowingly also prophesying of Christ through Mary.