The question of how G-d could have limited Pharoah’s free will is much discussed.
I once suggested that G-d does not limit man’s free will: but Pharoah considered himself a deity, so G-d treated him accordingly – G-d would not be bound by rules for the treatment of humans for someone who refused to consider himself to be a man like any other.
My #1 son suggests an alternative – and perhaps far more satisfying – answer: Pharoah limited the free will of the Jewish people, by refusing their choice to leave Egypt, six times. As a result, G-d limited Pharoah’s free will, measure for measure, six times!
This explanation not only shows why the numbers match, but it also is a stirring example of how G-d views freedom and liberty. The Torah may be telling us that if a human takes away the free will of another, the G-d may do the same to us.
Indeed, the Talmud Yerushalmi says some Jewish tribes had slaves, and G-d told them that they had to free their slaves before they could be freed in turn. The lesson seems clear: you cannot be free if you do not grant freedom to others. And G-d did not discriminate: all men pay the consequence for limiting the freedom of others, by having their liberty constrained in turn.