Christ rose from the dead, however, on Sunday, the first day of the week, and the early Christians, starting with the apostles (those original disciples), saw Christ's Resurrection as a new creation, and so they transferred the sabbath from Saturday to Sunday.
Since all Sundays—and not simply Easter Sunday—were days to celebrate Christ's Resurrection, Christians were forbidden to fast and do other forms of penance on those days. Therefore, when the Church expanded the period of fasting and prayer in preparation for Easter from a few days to 40 days (to mirror Christ's fasting in the desert, before He began His public ministry), Sundays could not be included in the count.
Thus, in order for Lent to include 40 days on which fasting could occur, it had to be expanded to six full weeks (with six days of fasting in each week) plus four extra days—Ash Wednesday and the Thursday, Friday, and Saturday that follow it. Six times six is thirty-six, plus four equals forty. And that's how we arrive at the 40 days of Lent!