The ambiguity comes from a difference between the Hebrew Old Testament and the Septuagint (a Greek translation). Jesus is teaching to forgive by reversing the statement of Lamech in Genesis 4.
Gen 4:24 "If Cain is avenged sevenfold, Then Lamech seventy-sevenfold." (NASB)
The NASB follows the Hebrew which has שִׁבְעִים וְשִׁבְעָֽה (shib'iym wshib'ah), which means "seventy-seven."
Instead the Septuagint has ἑβδομηκοντάκις, (hebdomekontakis), which means "seventy times seven."
If Jesus quoted the Septuagint, then He said "seventy times seven." If He quoted the Hebrew, then He said "seventy seven (times)." A case could be made for either as both the Hebrew Scriptures and Greek translations of the same were in use in the Land.
A more important question than "which did He quote?" is "what is He teaching by it?" And in this case, whether He quoted the Hebrew or Greek, the teaching is the same.
The common thinking in Jesus' day was that you only had to forgive three times. Peter obviously thinks he is being very generous by saying he will forgive seven times when someone has hurt him. This is double the teaching plus one and is also the perfect number in Hebrew thought. Peter may have been drawing on such verses as Lev. 26:21; Deut. 28:25; Ps. 79:12; and Prov. 24:16, which speak of revenge and loss. Peter is saying that if revenge should be taken seven times, then forgiveness should also be offered seven times.
Jesus then raises the stakes. He alludes to Gen 4:24 where Lamech says that he is avenged more than Cain. Jesus turns the statement of revenge around and says that is the number of times we must forgive.
Though there is great numerical difference between seventy-seven and seventy times seven, it is not an important theological difference. Jesus is saying that His disciples should forgive as many times as it takes. If someone wrongs you once, you can recall that easily. If they wrong you three times, you can still number those rather easily. If you can list off seven times the person has wronged you, you are either keeping track or have an exceptional memory. But for either 77 or 490 wrongs, you are keeping track, and the question could be put to you have you ever forgiven even once?