Top officials of the new Ugandan government are having a hard time deciding how much foreign aid they will need to overcome the legacy of mismanagement left by ousted president Idi Amin.

Masters of little more than half Uganda's territory - and that thanks to the Tanzanian Army - the new government's Cabinet ministers also readily admit that they have no clear idea of what is going on in the rest of the country.

But none of this confusion seems to matter.

The United States, the member states of the European Economic Community, international orgainzations and private charities all seem prepared to overlook the provisional government's disorganization, compounded by the long exile of many of its ministers who find it difficult to get used to today's Uganda.

The basic message is that the West, which delighted in castigating Amin, feels honor-bound to help now that black Africa's most publicized tyrant has been ousted.

The new team is strong on tribal and religious balance, professes the virtues of democracy, is sincere in its desire to avoid witch hunts and to re-educate Uganda and can count on one of the continent's richest farming areas.

With all that, however, the new authorities so far have demonstrated a singular and dramatic inability to deal with Uganda's most pressing problems.

Here in the capital, while some remorseful Ugandans have answered their religious leaders' appeal and return looted goods, few residents venture forth after dark. The sound of automatic weapons and explosions is heard day and night. Nor is there any clear idea what economic damage was inflicted on the country during eight years of Amin's reign of terror.

No serious inventory has been carried out. Specialists suspect that the overall situation may be less catastrophic than the government would like to paint it, in hopes of attracting maximum foreign aid.

Speaking from his looted sixth floor office, Finance Minister Sam K. Sebagereka looked down on Kampala's ransacked shops and offices and said, "What you see on the surface is better than what you can't see."

He insisted, "We are going to perform miracles," but added that to perform them, Uganda will need$2 billion in aid in the next 12 months.

Some foreign specialists believe no miracle will be needed and that with modest commodity import programs generating funds for reinvestment, Uganda will be able to dig itself out of its predicament with one-tenth that amount of aid.

"Amin let everything that mattered go to pieces," the minister said.

But if many a shop shelf was bare even before the looting last week, Uganda still seems well ahead of comparable African dictatorships, with even worse economic messes, such as Zaire and Guinea.

Signs of good will abound.

Major oil companies, which cut off Amin's supplies when he ran up a $14 million bill, now say they will provide oil for cash and wait on the outstanding debt until Uganda is in a better position to pay.

As the finance minister remarked, Uganda has important assets-90 percent of the population is rural and has enough to eat, the land is fertile and Ugandans are hard-working and intelligent.

Moreover, whatever their other differences, the new authorities appear genuinely sold on the virtues - and pragmatic advantages - of tolerance. Mathias Endogi, minister for regional administration, has held meetings of top civil servants to reassure them "that no one is going to be unfairly untreated" and to urge them to remain at their jobs.

"I told them that we came to liberate Uganda, not to make them suffer," he said, adding that he had noted "relief on their faces."

Robert Serumaga, minister of commerce, said, "If you remove a regime for its insanity, then you have lost your raison d'etre if you start a witch hunt."

Foreign Minister Otema Almadi explained the government philosophy: "Never again should Ugandans have to leave as refugees."

Equally pragmatic is the new government's attitude toward Kenya, which controlled landlocked Uganda's economic lifeline to the Indian Ocean.

Almadi is due in Kenya on Monday for talks to normalize relations, strained by the Nairobi authorities forebearance toward Amin. Some exiles believe that policy included turning over a few of their colleagues to Amin's clutches - and almost certain death - only weeks before his fall.

Still, Uganda plans to ask Kenya to extradite at least the most notorious henchmen who have sought refuge there. Government ministers say some of the worst offenders are believed still in Uganda. Serumaga said the government possesses a list of 643 employes of the notorious State Research Bureau, the most brutal of Amin's secret police organizations.

"It is very important to keep a record of Amin's excesses," Serumaga said, "in order to prevent this kind of thing from recurring here."

The breakdown of the economy is perhaps the least of Amin's bitter legacies to his country.

"Much more damage was done to the people's values. Schools were no longer proud, tradesmen no longer trustworthy, the quality of work dropped tremendously," said Red Cross chairman Silvano Katama. "It will take a long time."

Yet, some of Uganda's key institutions - such as Makerere University, which traditionally has educated East Africa's elite - somehow managed to survive despite its lone, if often passive, resistance to Amin.

Vice Chancellor W. Senteza Kabuji said in an interview, "Most of us realized it was essential tht the seat of higher learning be maintained and han*ded over as a viable institution."

He made no effort to hide that he had done so only by cooperating with Amin, no matter how distasteful that had been.

Yet a foreigner who knows Uganda well predicted that despite all its tribulations, after five years of hard work "Uganda will once again be the economic backbone of East Africa."

Ugandans predict that if the government keeps its hands off - and provides sufficient cash incentives - farmer will once again grow such foreign exchange-earning crops as tea, coffee, sugar and cotton - abandoned under Amin in favor of food produced for the domestic market.

"One year the government didn't pay full price promised. Next year the government didn't pay at all. The third year the government didn't bother to collect the crop," a Ugandan offered as a reason why export crop production had declined drastically.

Indeed, the only reservation about Tanzania's crucial help in ousting Amin is that President Julius Nyerer's perceived dedication to rigid socialist economics, which some Ugandans fear might take root here.

Logically, however, Tanzanian influence should decline once the lifeline road to Kenya can be cleared of pro-Amin stragglers and Uganda's authorities extend their writ throughout the country.

Many important Ugandan government officials think Tanzania's most important contribution could be in rebuilding the shattered army to ensure tribal balance and dedication to national ideals.

[Ousted president Amin was in Iraq Sunday seeking help to regain power in Uganda, according to African and Western diplomatic sources in Nairobi, Kenya, quoted by the Los Angeles Times.]