After the 30th demonstration, Leonel Castillo, head of the Immigration and Naturalization Service, stopped counting.And he started acquiring a taste in demonstrators, giving points for originality, ingenuity. . .

"They had a good one in San Diego when I was speaking to the National Association of Social Workers," he says, smiling in his office on I Street. Castillo smiles a lot.

"They were outside chanting 'Castillo! Coyote! AhhhOooooo! Meaning I was a turncoat, a scavenger. When they got tired of that, they stormed the meeting. I let one guy talk about how we should open our borders to everyone, and thanked him.

"Afterwards, this guy comes up to me, crew cut and necktie. He sticks out his hand and I shake it. He says, "I'm from the Ku Klux Klan and we'd like to offer our help.'"

Castillo stares at his hand now as if it were radioactive.

"You can't believe the people who want to help us," he says, with a shudder of dread behind the smile which is dogged, chronic. He has a repertoire of smiles, actually: smiles of astonishment, frustration, confusion, naivete, embarrassment, futility. . .

Give Washington a crisis and it creates a scapegoat. Never mind that the scapegoat was originally brought into being to solve the very problem it gets blamed for, as with the very problem it gets blamed for, as with HUD and urban unrest in the '60s, or the State Department's China specialists in the '50s.

Now, with everything from budget airfares to boat people to burgeoniong Latin American populations, we have an immigration crisis. And as $50,000-jobs go, Castillo may have the worst one in Washington.

"Totally out of control," is the way Rep. Elizabeth Holtzman (D-N.Y.) about Castillo's Hamilton Fish jr. (R-N,Y.) about Castill's mumbling and helpless silences at a hearing-never mind that Castillo arrived on the HILL with no idea what questions he would be asked.

"I think I'm the only optimist in the whole place," Castillo has said, "and maybe that's because I didn't know enough."

This day, for instance, has been "fairly typical," he says. "The United Farm Workers called to complain that Mexican nationals are being brought in as strikebreakers. Tehy want us to do something, build a fence, anything."

Wait a second. Isn't the UFW liberal? Don't liberals want open borders?

"You have to realize that it's the growers who want the open borders," he says.

So that puts Chicano-rights groups and the growers on the same side, while allying the farm workers with the Ku Klux Klan?

"And don't forget the conservationists-the Zero Population people, the Sierra Club-they want tighter borders so we don't use up our resources.

"After that we had the soccer players. We heard there was a strike brewing, and a lot of them are foreign. They come here on visas contingent on their having contracts to work. If they strike, they may violate the contract. Then again, if they don't strike, and American players do strike, the they violate rules about quotas of foreign players on each team. We may get restraining orders from both sides.

"It's like the apple pickers in West Virginia last summer: On the same day, one judge threatened us with contempt if we didn't."

Castillo smiles. "The wisdom isn't clear, except I want to treat people decently."

But, "when I spent $400 to put soccer balls in our detention facilities, a lot of the old-timers here complained I should be spending the money on enforcement."

The old-timers: Clearly they had world of their own until Castillo arrived, a Carter appointee in May 1977. He is 39, the former city controller of Houston, and youngest INS commissioner ever. He is the grandson of a Mexican immigrant, and he's glad to illustrate just how far things have come by citing a favorite cartoon.

"It shows a man talking to his son. He said, 'Your grandfather was a wetback, I'm an illegal alien, but you, my son, are an undocumented worker.'"

It's hard to imagine that Castillo's hours are much better than his grandfather's. He keeps clothes and shaving cream at his office, and has slept the last two nights on a black leather couch underneath a map of the United States.

Castillo, who left his wife and two children behind in Houston, lives in a Foggy Bottom apartment smaller than his office. So riding his bicycle home at night doesn't hold much lure, except to keep him in shape.

In high school, in Texas, he was an all-state football play out a whole game with a fractured jaw. "I wanted to get my shots in," he says.

It's a smile of astonishment that flashes when he pushes open a fifth-floor door to the world of the old-timers at INS.

"Our files," he says.

Buckled cardboard boxes are stacked to the ceiling, filled with forms done by hand. Atop a file cabinet sit stray photographs and pieces of visa applications which have fallen out of the files.

"That means those people will have to start all over again," Castillo says. "That hurts, especially when you know that they start lining up at midnight outside of our local offices to get a chance just of getting inside the next day, so they can fill out applications which will take 48 months, four years to process."

In the next room, Castillo points to women sitting at desks dealing out little slips of paper into stacks.

"This is how we keep track of people, with these little slips. When I got here, we had 60 million of them, for all the aliens who've entered and left the country on visas. We match them up by hand. After the Iranian students rioted in Beverly Hills, the attorney general called up wanting to know how many of them were here, I said, 'Get serious.'"

There was huge pressure to deport the rioters, even though most hadn't committed deportable offenses. It lasted until the shah was ousted, and then the State Department started asking for special consideration for Iranians, Castillo says. And smiles.

"Lately, we've had the Haitian boat people coming in claiming to be political refugees. [Walter Fauntroy vehmently attacked Castillo's position that they were economic refugees]. I was down in Miami and Cubans were coming up to me and saying we would destroy the culture if we let them in. Cubans!"

Castillo strolls away from the surly miasma of paper, and into a room mounted with rows of computer terminals. He wants to computerize everything, he says, with a smile of eagerness now, because here is where he'll beat Washington at its own game, which is bureaucracy.

Yes, they may complain about Leonel Castillo on the Hill and in the White House; they may demonstrate and burn crosses and write angry editorials; and admittedly, Castillo says, "I haven't done nearly as well as I could have done, selling myself."

But that isn't the Castillo master plan.

"Some of my friends warned me when I came up here-they said it was political suicide. And it has cost me every one of my gray hairs."

But even though his budget is being cut, and INS staff morale is at an all-time low, with his own employes attacking him in print for a "come one, come all" immigration policy, Castillo is sculpting a monument, with bureaucracy as his medium.

"Data base managers" he says. "Data base managers! We never had them before! I'm building this automation right into the bureaucracy, creating whole new designations of people here, like data base managers. Someday, they'll have their own union. They'll be like the old-timers now, no way to stop them. It'll have its own momentum, it'll be running long after I'm gone!"

For the time being, the INS may be in trouble. But Castillo still smiles. CAPTION: Picture 1, Leonel Castillo, by Harry Naltchayan; Picutre 2, Leonel Castillo, by Harry Naltchayan-The Washington Post