I once heard a Shiur where the Rabbi said that originally there were not going to be 10 plagues, Just the threat of death of Egyptian firstborns should Pharaoh not listen. It was only once Pharaoh denied knowledge of G-d that G-d said there would be 10 plagues, so that the whole of Egypt would know who G-d is.
He explained it as follows:
In Shemot 4:21-23, G-d says to tell Pharaoh that if he does not let His firstborns go (i.e. the Jews), G-d will kill his firstborn sons. G-d mentions nothing about the other plagues. (note that the wonders mentioned in Shemot 4:21 do not refer to the plagues, at least according to Rashi).
In Shemot 5:2 Pharaoh says he does not know G-d. and then, in Shemot 7:2-5 G-d tells Moshe that He will increase His signs and wonders, but Pharaoh will not listen because G-d will harden his heart, "And the Egyptians shall know that I am the Lord when I stretch forth My hand over Egypt, and I will take the children of Israel out of their midst."
This is also emphasized during the different plagues, where G-d tells Moshe to tell Pharaoh that the plague of mixed animalas will be "in order that you know that I am the Lord in the midst of the earth." (Shemot 8:18). The plague of hail, "in order that you know that there is none like Me in the entire earth." (Shemot 9:14), and even more so, "in order to declare My name all over the earth." (Shemot 9:16)
Has anyone heard or does anyone know a source for this idea. I'd like to read it inside, to verify the details. It sounds like an interesting explanation, but I have some questions. For example, how does this explanation fit with Shemot 3:19-20, which seems to have G-d telling Moshe about the plagues before Moshe even goes to see Pharaoh for the first time.
Also, it does not seem that Rashi learns it this way, since in Shemot 4:23 he says:
That is the last plague, but He warned him [Pharaoh] about it first, because it was [the most] severe...