How many days are in Lent?

Lent is the penitential season of fasting and prayer that runs from Ash Wednesday until just before Easter.

The problem is that the length of Lent doesn't quite add up. It's often described as being 40 days long, but if you count the number of days between Ash Wednesday and the day before Easter Sunday, it's 46 days.

The church says "Ah, but you don't count Sundays, because you don't need to fast on Sundays". And by removing the 6 Sundays from the 46 days, you do indeed get 40 days. But then how is that meant to correlate with the time that Jesus was fasting in the wilderness? Did he have a day off on Sundays?

And what about the fact that Jesus was meant to return to Jerusalem on Palm Sunday, a full week before Easter? That's 40 days (including Sundays), but that's not what any Christian denomination teaches as Lent. The Catholic church says that Lent runs until Holy Thursday or Good Friday, and the Protestants says it runs until Holy Saturday!