As William H. Simons sat in his office recently, some of the telephone calls he fielded were familiar--teachers with problems. In 19 years of heading the Washington Teachers Union, Simons has heard a lot of teachers' problems.

But some of the calls were different, offering consolation for his apparent defeat in his bid for reelection as president of the 4,200-member union. The election results, which Simons disputes, show him losing to Ballou High School science department chairman James D. Ricks by four votes, 1,146 to 1,142.

"Some of the callers are saying they are sorry I lost and hope this can be turned around," said Simons, who has formally asked the U.S. Labor Department, which conducted the election, to hold a recount.

"I have lived with the understanding that this was not a guaranteed, lifetime job for me, so that when the time came, I have prepared myself to leave it and go on," said Simons, 58. "Although I didn't expect to be leaving this way."

Despite the uncertainty of the outcome, it is clear that this year's vote revealed much stronger opposition to Simons than has existed in the past. Interviews with teachers--most of whom asked that their names not be used--indicate that some responded to statements by Ricks that he could do more for them than Simons.

Other teachers said they had no complaints against Simons, but simply felt it was time for a change. Still others, especially those who didn't like the outcome of grievances they had taken to the union, felt that the incumbent union leadership was ineffective and unconcerned.

"I had a problem with my evaluation rating and filed a grievance with the union, and I was left hanging for a year without knowing that nothing had really been done about my grievance," said a teacher at Stevens Elementary School who had supported Simons in the 1981 election but voted for Ricks this year. "Simons was not doing for us what we needed. Ricks had a lot of interest and concern for elementary school teachers."

Another Stevens teacher, a Ricks supporter, said she felt Simons had done an excellent job in leading the union in the past. But, she continued, it was the Ricks campaign that was active and persuasive at Stevens this time around--not Simons'.

"I was impressed with what Ricks had to say," said the teacher, adding that she had known little about Ricks' stands on various issues, though he had run for Simons' job three times previously. "Simons has done a good job of building up the union. I was torn. I think Simons would have continued to do a good job, but I decided to vote for a change."

During Simons' long tenure, he has shown a remarkable talent for political survival. He embarrassed election opponents by huge margins and went unchallenged six times. The board members he fought during the divisive 23-day teachers' strike in 1979 have largely faded from Washington's political scene or seen their power wane. But Simons survived--at least until now.

"I'm completely surprised at the results, but I believe that the outcome will be different and that I will still be around for at least another two years," Simons said, referring to his request for a recount. "I'm just sitting and rocking and moving right along. The curtain hasn't closed and the fat lady hasn't sung."

Some observers feel that Simons may have had trouble because there was no single galvanizing issue for teachers to rally around. They add that Ricks' campaign made much of a U.S. District Court ruling throwing out Simons' last election on grounds it was not conducted by secret ballot; a strong organization; complacency in the Simons camp; and promises of more benefits and less work for teachers.

"Politicians always try to put these things in perspective. Churchill led England through World War II and then lost his next election," said City Council member Frank Smith Jr. (D-Ward 1), formerly on the school board though not during the strike. Smith said that Ricks had capitalized on members' discontent with the union that had been smoldering for some time.

"Despite his outstanding record as a union leader, there were times when grievances by teachers came through my school board office that logically should have been the handled by the union," said Smith. "I think that some teachers may have lost faith in the ability of . . . the union to deal with their problems, whether that was really true or not."

Another factor may have been the desertion of six former stalwarts of the Simons camp, all of whom decided to run against Simons this time. One of them, Jimmie D. Jackson, had been Simons' general vice-president and won 275 votes in the election.

A desire for new leadership "does follow the pattern of teachers in other large cities like Los Angeles and Philadelphia," said Samuel B. Husk, executive director of the Council of the Great City Schools, an information and research service for 30 of the nation's largest school systems. "They see the gaps widening in what other people in other professions earn. The desire for change is the kind of thing that occurs when you have the kind of stress that a poor economy places on people."

In Washington, however, there appeared to be little reason to expect a dramatic shift in union loyalty. No teacher layoffs are on the horizon, as they are in some other cities. While teachers in many other school districts are getting no pay increases or small ones of less than five percent, teachers here are in the second year of a contract that gives them a 21 percent pay raise over three years. Student performance has improved, and when it does, there generally is less pressure on teachers.

But Ricks used mass mailings and a newsletter to campaign against the school system's teacher appraisal process. He promised elementary school teachers an hour of duty-free time a day instead of the current 30 minutes. He promised to fight for more money for school libraries and for contractual safeguards against teacher layoffs.

"I worked in the morning before school. I worked during lunch. I worked at night. I had a program for the future and Simons didn't," said Ricks. "We ought to be fighting for more money and fighting to make sure that education works in this city."

And teachers listened, even though Ricks has no experience in negotiating union contracts and is largely a question mark to some of the city's most important politicians and education officials.

"I know nothing about Ricks," said City Council member Hilda Mason (Statehood-At large). "I don't know how well the people who voted for him know him."

The bottom line of how close teachers felt to the union's leadership and how well its school representatives kept informed is difficult to assess, but one measure could be how many people have traditionally turned out to vote on union contracts.

Simons said that there have been votes, with a week's advance notice, in which fewer than 200 teachers participated. The contract ratified last April by a mail-in vote passed 1,209 to 385, which may be interpreted to mean that less than half of the union's 4,200 members were solidly in favor of it. Much more than half the union's membership voted in the most recent election.

"I recognize there were discontented teachers and I suspect it was possible for Ricks to be able to contact a number of teachers and convince them that change was needed in the union," said Simons.

But Simons, union president until next week and awaiting the Labor Department's decision on his request for a recount, has given no sign that he is preparing to leave office.

"I haven't moved a thing," he said. "There's still plenty of time for that . . . if it's necessary."