The new figure was posted on an UNHCR website. More than 2.3 million have arrived in Poland, but many have traveled onward to other countries or back into Ukraine.
Aid workers say the numbers have eased in recent days as many people await developments in the war. An estimated 6.5 million people have also been displaced from their homes within the country.
More than 608,000 have entered Romania, over 387,000 have gone to Moldova, and about 364,000 have entered Hungary since the war began on Feb. 24, based on counts provided by governments.
From the onset of the war, UNHCR had projected that about 4 million people might flee Ukraine —though it has repeatedly said that it has been reassessing its forecasts.
“Refugees from Ukraine are now 4 million, five weeks after the start of the Russian attack,” U.N. High Commissioner for Refugees Filippo Grandi tweeted as he crossed the border into Ukraine.
Grandi said he would be in the western city of Lviv and discuss ways to increase its support “to people affected and displaced by this senseless war.”
UNHCR teams and their partners have been working to deliver protection, emergency shelter, cash assistance, core relief items and other critical services for those who have fled.