"I am the Lord your God, who brought you out of the land of Egypt, out of the house of slavery" (Exodus 20:2). In most Jewish traditions that line counts as the first commandment. No other gods and no idols then count together as the second. Most Protestant and Orthodox churches treat Exodus 20:2 as an introduction and start counting at "you shall have no other gods before me" (Exodus 20:3).
The New Oxford Annotated Bible, a study Bible, says Exodus 20:2 is God naming himself and recalling what he did, not a commandment. Its note on Deuteronomy 4:13 adds that the Hebrew phrase that is translated as the ten commandments means the ten words or the ten sayings. Michael Coogan, a scholar, says nine actual commandments then follow in the Jewish count.
Learn the Bible.
Not just the stories, but the history, authorship, and scholarship behind it.