VIENNA, JAN. 25 -- At least 5 million people want to leave the Soviet Union for the West, a senior Soviet official said today, raising the specter of mounting illegal immigration if European countries fail to adopt measures to cope with the likely exodus.

Vladimir Shcherbakov, chairman of the State Committee for Labor and Social Affairs, urged representatives to a 34-country conference on East-West migration to reach bilateral and multilateral accords with Moscow so the movement could take place in a "civilized" fashion.

Fears that Soviet citizens may bolt westward to escape hardship and instability prompted European states to hold the two-day meeting under the auspices of the Council of Europe. Anticipating a possible refugee stampede, Austria has deployed thousands of troops along its eastern border. Closer to the Soviet frontier, Poland, Czechoslovakia, Hungary and Finland also are making contingency preparations.

But Shcherbakov cautioned against dramatizing what may occur when new Soviet travel laws take effect. He said many weighing their departure may not go through with it and estimated that only 1.5 million to 2 million people actually will emigrate.

"Public opinion has sometimes been frightened by the idea that once the borders will be opened, the entire Soviet population will move into Europe, leaving everything behind," he told a news conference. "There will not be a human wave rolling over Europe coming from the Soviet Union."

Despite these palliative remarks, the Soviet delegation did little to ease Western concerns by dismissing queries from countries eager to discuss the impact on emigration of Soviet military action in the Baltics. "This conference is not the best place to do that," said Shcherbakov. "Each country has its own Ulster, its New Caledonia."

Officially guaranteed the right to leave their country as of Jan. 1, Soviet citizens are awaiting final passage of a separate law to speed up issuance of passports. Even then, "We do not have enough paper to provide passports for all those wanting them," said Shcherbakov.

Soviet Foreign Ministry consular official Igor Khalevinski predicted that the emigration law would be passed by summer. A six-month grace period would follow before it enters into force, so that the expected big rise in Soviet emigration is likely to come at the end of this year, he said.

Shcherbakov warned that with Western states throwing up barriers to East European immigrants, Soviet citizens may soon find themselves with passports but nowhere to go. "There will be a greater illegal flow of migrants," he said.

Given revolutionary changes in Eastern Europe, Western states argued that while they remain committed to welcoming genuine political refugees, there could be no more automatic presumption in favor of asylum seekers from the former Eastern Bloc. The conference's final communique stated that the 1951 Geneva Convention on refugees applies to those fearing political, religious or racial persecution, but not to people leaving home for economic improvement.

Turkey appealed to the conference for assistance to refugees from the Persian Gulf War. The United Nations has predicted that about 1.5 million may flee the combat area.