It is impossible to count the endless rows of American-built helicopters as one flies into Isfahan, Iran, but a source working with them said the aircraft number 500. It is a ghostly fleet that stands as mute evidence of a squandered American investment in Tehran.

In the middle of the desert, an entire American suburb of Shahinshahr stands virtually abandoned. The city, north of Isfahan, housed some of the 45,000 technicians who came from the United States to maintain the helicopters and other sophisticated equipment and to train Iranians in their use.

McDonald's and Kentucky Fried Chicken restaurants still dot the Iranian landscape. Peanut butter is still a favorite in the supermarkets. Tens of thousands of Iranians hold diplomas from American universities and academies, or were trained for their jobs by Americans.

Today, however, Iranians blame every ill that befalls their country on the United States. Why are Iranians so willing to accept that any controversial event -- whether the enthronement of the shah, the takeover of the U.S. Embassy, a demonstration against Islamic garb for women, or an explosion in a shopping center -- is U.S.-inspired?

For many Americans, Iran could probably cease to be a problem simply with the release of the 52 hostages held for nine months. Return the hostages, and most Americans would be happy to turn their backs on Iran and say, "Go ahead and have your revolution."

The issue, however, is not seen that way in Iran. Even though the shah is dead, the depth and -- some would say -- the blindness of American support for the monarch require a more profound exorcism.

Iranians live every day with the evidence of American policy. Only 10 percent of the helicopters, for example, are operational, and few of the 10 Boeing 747 jets at Tehran's Mehrabad Airport are in flying condition.

Iran is responsible for the nonoperational state of the aircraft, which is due to a lack of spare parts embargoed during the hostage crisis and the exodus of foreign technicians who feared for their security after the revolution.

But the presence of the aircraft was a joint American-Iranian responsibility under the shah, who sought to use his country's new-found oil riches to make him the dominant force in the Persian Gulf.

The policy of the former president Richard Nixon and secretary of state Henry Kissinger was to sell the shah anything he wanted, partly on the theory that "if we don't, someone else will." The U.S. military-industrial complex was more than happy to oblige, and thus $10 billion worth of American weapons -- including some of the most sophisticated military hardware available -- fell into the hands of a mainly illiterate nation whose leader had aspirations to world power.

The abandoned city of Shahinshahr evokes another kind of pain for Iranians. With the arms influx of the early 1970s came thousands of American technicians. Shahinshahr was their city, and it was a place where Iranians were made to feel unwelcome.

The unfriendly atitude of some Americans toward their Iranian hosts started well before the 1970s. Sixteen years ago an Iranian reporter and a photographer tried to enter the American high school in Tehran to cover a dance for an English-language newspaper. They were bluntly told that no Iranians were allowed and were beaten up when they protested.

Resentment at such treatment still lingers. Gholam Reza Karimabadi, a taxi driver sitting in a decrepit south Tehran tea shop said: "The Americans came there before and enjoyed themselves, but they considered Iranians to be animals."

More important to Iranian sensibilities, however, was the American role in returning the shah to power in 1958 and establishing his feared secret police, SAVAK, with Central Intelligence Agency assistance.

Iranians, even in normal times, have a strong tendency toward xenophobia after almost a century of what they feel has been foreign domination, first by the Soviets, then by the British, and finally the Americans. Now, in the midst of the world's first modern-day religious revolution, the economy and the country appear to be disintegrating. In their search for a scapegoat, the American role in enthroning the shah and creating SAVAK provides a convenient candidate.

During the 1970s, Amnesty International and other human rights groups accused SAVAK of holding about 10,000 political prisoners and systematically torturing them for information.

Throughout this period as the shah assumed dictatorial powers, the State Department attitude was that it was "the shah or the communists." Each time he visited the White House, the shah was received royally by presidents who conveniently ignored his human rights record.

During most of that period the shah maintained a tight rein on the press just as the Islamic government does today. Late last month I hastily left Iran one step ahead of probable imprisonment or expulsion. It was sobering to recall that my previous unscheduled exit from Tehran was forced by SAVAK 15 years ago when I was declared persona non grata because of censorship violations.

The chief concern of the U.S. Embassy during the days of the shah was that the image it put forward of Iran as a developing democracy remain unsullied. With Iran making entry difficult for critical reporters and with the State Department running a sort of public relations agency for the shah in the United States for so many years, it is little wonder that Americans found it difficult to understand how the shah switched from being a hero to a villain almost overnight.

A lawyer who was a longtime opponent of the shah and now is fighting the new rule in Tehran finds the prospects "very dark" for human rights under Ayatollah Ruhollah Khomeini.

"Religious dictatorship, military dictatorship, monarchical dictatorship -- it's all the same," he said. This government, he said, seems "to execute more but torture less."

There are differences in style however. SAVAK never announced its depredations so it is impossible to knowhow many were executed. The current government almost seems to take pride in its mounting execution toll, which stands about 1,000.

Under the shah, the security forces were relatively efficient in systematically wiping out opposition.

"With SAVAK at least there was a system" an economist on the verge of being purged said. "SAVAK torture was to get information, not for personal savagery."

He cited the case of two middle-class women who criticized Ayatollah Sadegh Khalkhali, the "hanging judge," to his face. "I'm your God," Khalkahali told the women, according to the economist. "I can line you up and have you shot and just say you were prostitutes."

The Islamic republic at times seems to be run by vigilante committees who arrest people at will. Revolutionary courts try, convict and execute hundreds without a semblance of due process of law, sometimes for such crimes as adultery or prostitution. The shah handled his public relations much better than the Iran of the ayatollahs under whom public executions have been resumed. In one of the gruesome reminders of what most people think is a past long buried, four persons were stoned to death.

At times not even officials are safe. A hotel manager told of being awakened at 1 a.m. by a revolutionary committee that searched his room and tried to force him to sign a document. The manager noted that since the government owned 50 percent of the hotel, the minister of national guidance, Nasser Minachi, would also be required to sign. His heavily armed interrogators sneered and one said if Minachi didn't sign, "We'll line him up against the wall and shoot him." It was not necessarily a hollow threat since the minister had already been arrested while in office.

Much of the insecurity seems to stem from the lack of day-to-day control in the vaguely outlined system of government under the Islamic republic.

"They think running a state is like running a mosque," one longtime observer said.

Yet the human rights lawyer could also see a brighter side. Fear of the omnipresent SAVAK meant few Iranians voiced their discontent. Today it is common to hear criticism, even of Khomeini, partly because the security apparatus is poorly organized. The lawyer admitted he would not have had such a conversation in his office during the shah's reign. Feedom of expression has rapidly eroded in the last year, however, and there are fears that soon the situation will be the same as under the shah.

"The great crime of the shah was that he wiped out all politics," a Western diplomat said. There is no experience in forming alliances and little spirit of compromise. Khomeini sits above the battle and successfully uses divide-and-conquer methods, switching support from clerical to secular forces, making certain no one can rival him for power.

President Abol Hassan Bani-Sadr is the emblem and victim of Iran's theocratic politics -- a powerless president kept twisting in the wind, his decisions regularly reversed at the Khomeini's whim, his office the frequent object of scorn and humiliation.

Even Khomeini seems to have realized that the country is becoming ungovernable, although he has continued his tactics.

"Everywhere in the country there is only discord and conflict," he said in a recent speech. "If this situation continues it will soon be impossible to direct the nation."

"The revolution has proved that Iran has no structure, no law, no order," the rights lawyer said. The economist was even more scathing, saying the government "gets mixed up between law and ethics. He cited a case where the Central Bank needed an experienced person but the hiring order that went out to the civil service said, 'Please send a dedicated Moslem.'"

Indicative of the discord in the military, Brig. Gen. Ghossam Ali Zahir-Nejad, the chief of staff, complained that the Revolutionary Guard, an auxiliary force, did not always carry out orders but instead issued their own.

As the chaos continues with no end in sight, Iranians increasingly are telling foreigners that the country has "substituted one dictatorship for another." The discontent mainly comes from middle-class citizens, many of whom are hoping to leave the country, and it is unlikely to result in any move soon to remove Khomeini and his Islamic revolution.

One of the privileged under the shah admitted in a burst of candor: "We are only 5 percent of the population. We have no roots in this society. We are the children of Pahlavi times and have no future here. We were ruling by force."

Khomeini's main support comes from the masses who, through the heady elixir of revolution and religion, feel for the first time that they have a share in power. Although unemployment has shot up to two million among a population of 35 million, many workers have gotten large raises under the new government and also have gained control over some of the operations of their factories.

Besides, as the economist said, "they have plenty of circuses," a reference to the frequent street demonstrations where the mobs chant "God is great" and "Death to Carter." Any attempt to overthrow Khomeini would no doubt bring at least a million people into the streets of Tehran to support him.

As long as Khomeini's people share his view of martyrdom, it is difficult to foresee any changes in the leadership.

"There is no defeat for Islam," he said recently. "Martyrdom is not defeat. Victory is not defeat either.You either become victorious or martyred. In both cases victory is on your side."