The Bible never numbers the plagues of Egypt, but the number ten has been canonized in tradition, and a canonical list of the ten plagues appears in the Passover Haggadah. The 18th century enlightenment commentator Naftali Herz Wessely breaks free from the number ten, offering a more persuasive structure of twelve miracles.The Book of Jubilees is the first source that specifies ten plagues. There is no one right answer to the question. It depends on what you want to define as a plague.
I suspect that tradition settled early-on on the number ten to go with the Ten Commandments, which are revealed next in the narrative. And in their case, the Bible does specify the number ten ("ten words" in Exodus 34:28 and Deuteronomy 4:13 and 10:4). I am far from the first to notice this connection.
That said, specifying a number doesn't remove ambiguity. There are three lists of the Decalogue, in Exodus 20, Exodus 34, and Deuteronomy 4. They are all unnumbered. The list in Exodus 34 has somewhat different laws from the other two. There has been plenty of debate about how to divide them up. And then when you start looking at manuscripts and recensions and ancient translations, it gets even more complicated.
A couple of relevant PaleoJudaica posts on the plagues are here and here.
Relevant posts on the Ten Commandments are here, here, here, here, here, and here.
Visit PaleoJudaica daily for the latest news on ancient Judaism and the biblical world.