Im Lavan garti
v'taryag mitzvos shamarti
Ki his lanu ha'oz v'ha'orah
עם לבן גרתי,
ותרי"ג מצות שמרתי
כי היא לנו העוז והאורה
I stayed with Laban, but I still observed all 613 commandments.
I will rejoice and find happiness in this, the Torah, because it is to us a strength and light.
Genesis 32:4-5 states: "Jacob sent messengers ahead to his brother Esau in the land of Seir, the country of Edom, and instructed them as follows, Thus shall you say, ‘To my lord Esau, thus says your servant Jacob: I stayed with Laban and remained until now.'"
Rashi's interpretation of this verse includes the following:
כלומר עם לבן הרשע גרתי ותרי"ג מצות שמרתי ולא למדתי ממעשיו הרעים
"This is to say, I lived with the evil Laban, and still observed the 613 commandments, and did not learn from his evil deeds."
For more information, see this link.
Song lyrics are from the Torah verse, Rashi's interpretation, and the liturgy.