Is it true there were 2.5 million Israelites fleeing Egypt?

There probably would have been something like that number; the total number is generally taken as between 2 and 3 million (!) men, women, and children.

The Bible does not reveal the total number, but there were 600,000 men:-

Exo 12:37 And the children of Israel journeyed from Rameses to Succoth, about six hundred thousand on foot that were men, beside children.

(For census purposes, only men of military age were counted: women and children were not included. The women and younger children were possibly riding on wagons, while the older children walked with their fathers and older brothers.)

Playing with figures:

1. Suppose all the men in the army were married, each family had 3 young children:-

Men 600,000

Their wives 600,000

3 Children /family 1,800,000

TOTAL 3,000,000

2. Suppose a quarter of the men in the army were married with 5 children, with 3 of the sons with their father in the army:-

Men - married 150,000

Wives 150,000

Men - sons 450,000

2 children/family not in army 300,000

TOTAL 1,050,000

The minimum number fleeing Egypt would have been 1 million, making an average of these two somewhat-unrealistic scenarios of 2 million people. Add another couple of hundred thousand for men too old to be in the army, widows, unmarried women, and Egyptians, and there would easily be 2.5 million fleeing Egypt.