How long is Lent?

How long is Lent? It's something that has puzzled me, because the period from Ash Wednesday to Easter Saturday, inclusive, is six weeks and four days; 46 days. Lent, though, is supposed to be a forty day fast, is it not?

On Ash Wednesday, I heard that the period covered forty fast days and six Sundays, which made sense. The Catholic Encyclopaedia online, in its article on Lent, notes that at the time of Gregory the Great (590-604) Lent consisted of six weeks of six fast days, and only later was this period extended to Ash Wednesday to bring the number of fast days to forty. In earlier times, in Jerusalem, both Saturday and Sunday were exempt from fasting, and Lent was observed over eight weeks.

The same article, in discussing the nature of the fast, gives an insight into two Easter customs: Easter eggs and the pancakes of Shrove, or Pancake, Tuesday, the day before Ash Wednesday. What food is, or was, prohibited in Lent? In particular, were lacticinia, essentially dairy foods and eggs, allowed? As the practices of Lent developed, lacticinia came to be prohibited. However, exceptions could be made when associate with charitable works. Such dispensations were known in Germany as Butterbriefe, and one of the spires of Rouen cathedral was once called the Butter Tower. Hence also, the feast of butter and eggs on Pancake Tuesday, and the celebratory gifts of eggs at the breaking of the fast.