From the Talmud:

Rabbi Simlai taught "Six hundred and thirteen commandments were given to Moses; then David came and reduced them to eleven in Psalm 15.; Isaiah (33:15), to six; Micah (6:8), to three; Isaiah again (56:1), to two; and Habakkuk (2:4), to one: 'The just lives by his faithfulness'." Makkot 23b-24a