The District of Columbia's slow and cumbersome vote counting process and the refusal of the two apparent losers to concede defeat set the stage yesterday for an agonizing week-long waiting game before the winner of Tuesdays close Democratic primary race for the mayoral nomination is definitely known.

But council member Marion Barry, who held a slim but steady lead when counting stopped early yesterday, began acting and talking like a winner, anyway. And associates of the two candidates who trailed, City Council Chairman Sterling Tucker and Mayor Walter E. Washington, said privately they did not believe their candidates would overtake Barry when the more than 5,000 challenged and absentee ballots are counted next week.

"Everybody knows that miracles can happen," said one confidant of Walter Washington. "But nobody thinks it's very likely."

Incomplete but official returns from all 137 precincts released shortly after 3 a.m. yesterday showed Barry with 30,589 votes or 34.6 percent of the total; Tucker with 29,401, 33.2 percent and Washington with 27,798, 31.4 percent.

Determination of the winner technically hinges, however, on the tabulation of 5,000 to 5,600 still uncounted absenbtee and challenged ballots.

Both campaign officials and city elections officials acknowledged privately that absentee and challenged ballots in Washington usually were divided among candidates according to the same patterns as the regular vote.

The absentee and challenged ballots will be counted next Tuesday at the District Building by the D.C. Board of Elections and Ethics and the winner certified a day or two later.

The Democratic nominee will face Republican nominee Arthur A. Fletcher, U.S. Labor Party candidate Susan Pennington and independent Glova E. Scott in the Nov. 7 general election.

Fletcher, saying he expects to face Barry in the general election and will actively court support from the two apparent losers, got his campaign off to an early start with a noon-time press conference at the District Building.

"As close as this is and the way they've muddled up the count, I know there's somebody who's got to be made," Fletcher said. "I'm gonna play to win and I'm gonna play well, and I intend to be the next mayor."

Fletcher's press conference, attended by a handful of reporters, was one of the rare pieces of action at the District Building yesterday, where empty halls and offices and a bit of post-election gloom were otherwise the order of the day.

Neither Tucker nor Washington came to their offices yesterday, aides said, Tucker, whose whereabouts

Charts list election winners in the District of Columbia and Maryland., Pages B4, B5. were known to only his closest associates, did return a reporter's telephone call late in the afternoon.

He said he expected the results of the uncounted votes to mirror those of the ballots already counted. "I have no reason to think otherwise. I'm not sitting around hoping," Tucker said. "My only concern is that the public think it got a correct count."

Aides to Washington said he was at home with ailing sinuses that had choked up his voice when he spoke to his supporters at what was to be a victory rally early yesterday morning. But Washington's office did issue a short statement.

"The District of Columbia primary election has concluded and canvassing of returns is under way," the statement reads. "Meanwhile, I want to thank the voters who cast their ballots for me and all who worked so hard in my behalf.

"As mayor, I expect all units of the city government to work together to assure that our people are well served during this period."

Some of the mayor's administrators were trying to do just that. City Administrator Julian R. Dugas was apparently in his office as usual at 7 a.m. Department of Human Resources Director Albert P. Russo, preparing news releases for a routine press conference today, met former police chief Maurice J. Cullinane outside the mayor's office.

"The wheels of government must go on," Russo told Cullinance.

And planning director Ben W. Gilbert, who Barry said he would fire if elected, was in his office by early afternoon, tending to telephone calls and refusing to talk about what he might do after Jan. 2, when the new administration would take office.

Martin K. Schaller, the mayor's executive secretary, saw a reporter at lunch, raised up both of his arms and said with a smile, "I need a job."

"Is it all over?" the reporter asked.

"It's all over," Schaller said.

John R. Risher Jr., the former corporation counsel who represented Washington's campaign was more upbeat.

Risher tried to coin his own variation of Washington Bullets Coach Dick Motta's borrowed hang-on-in-there motto, "The opera isn't over till the fat lady sings."

Risher said, "Everybody wants to hear the fat lady sing but you can't sing until you have the numbers. The fat lady hasn't sung. She hasn't even come out on the stage yet because the score hasn't even been written."

Risher, along with anxious but weary lawyers and campaign officials for Tucker and Barry, attended an afternoon briefing by elections officials, who tried to explain what the next step would be in the vote-counting process.

Elections board officials estimate 1,000 absentee ballots were issued to District voters and up to 4,600 challenged ballots were filed and sealed during Tuesday's primary.

Challenged ballots often occur, for example, when a voter, who has moved from one precinct to another, has no voter registration card on file at his new precinct. He is permitted to vote, but his ballot is sealed in a special envelope with his name, address and reason for the challenge written on the face of the envelope.

City election regulations require that challenged ballots not be counted for one week after the primary so that election workers can examine each challenge and determine from the information on the envelopes if the voters are bona fide registrants. Representatives of the mayoral candidates will be permitted to observe the verification process, which is expected to take at last two days, according to elections board general counsel Winfred Mundle.

Envelopes containing the challenged ballots approved by the board will then be opened and the ballots counted along with the absentee ballots. Totals will be added to Tuesday's regular vote total and the winner certified. A candidate can request a recount within seven days after certification.

In the one major mix-up of Tuesday's primary, election workers at Precinct 69 in Ward 5 ran out of Democratic ballots in the late afternoon, and an undetermined number of potential voters left the polling place before election officials brought fresh ballots to the precinct.

Shari Kharasch, head of the elections board, said yesterday the board will conduct an inquiry in an attempt to determine how many would-be voters left the polling place. The issue is crucial because of the extremely close race for the Ward 5 Council seat between incumbent William Spaulding and challenger Robert Artisst. Artisst, trailing by 311 votes, said he is considering asking the board to set aside the election.

Precinct 69 captain Frances Barnett called the elections board central office in the late afternoon and said she was "running low" on ballots due to an unusually heavy turnout, according to Delores Woods, deputy administrator of elections for the elections board. Elections official Lindell Tinsley was dispatched at about 6:30 p.m. to pick up unused ballots at an adjacent precinct. When he got there, he said, however, "they had only a few ballots and a long line" of people waiting to vote.

To avoid creating ballot shortage there, Tinsley drove to another precinct, picked up 250 fresh ballots and rushed to Precinct 69, arriving, he said, between 7:40 and 7:45 p.m. The polls were scheduled to close at 8 p.m. Tinsley said the precinct had run out of ballots by the time he arrived and 100 to 150 people were still waiting in line to vote. They were told that new ballots had arrived, and all voted by about 8:15 p.m., Tinsley said. An undetermined number had given up earlier, however, and left before the ballots came, Tinsley said.

Artisst estimated 250 potential voters left the line in the evening and another 75 to 80 earlier in the day when he said the precinct also temporarily ran out of ballots.