Officially, nobody knows who won Tuesday's Virginia Senate race between Democrat Andrew P. Miller and Republican John W. Warner, but the process of finding out should be well under way today.

By noon yestereday, election officials in all of the state's 1,857 voting precincts were to have turned over to county or city Circuit Court clerks their poll record books, all paper ballots and the keys to automatic vote counters in the voting machines now used in all but five rural Virginia counties and a handful of precincts.

According to state law, local election boards are to begin counting the ballots and counter reports by noon today. Official reports of the counting, sent to the state board of elections by registered mail, will probably be in Richmond by Monday.

Those official reports, called abstracts, will be studied by the board's officials against a second set of reports, called precinct tally sheets, collected and brought to the capital by bounded couriers.

After the board's staff has reconciled any difference between the sets of figures, the next step is an official review by board members - called a "canvass." In the canvass, a pro forma-public session lasting several hours, the board in effect retotals the figures that its staff has already cerified.

Even if the results are ready by next week, according to the board's executive secretary, Joan S. Mahan, state law dictates that the canvass be held on the fourth Monday of November (Nov. 17).

Until then, the official tally is a secret - from the candidates, the voters and the press.

Even then, the process is not ended. If the leading candidates - Miller and Warner in this case - are within a percentage point of each other in total votes, the loser can demand a recount by petitioning a state Circuit Court by Dec. 7.

The mechanics of the recount are up to the three Circuit Court judges appointed by the chief justice of the state Supreme Court to preside jointly over the recount case.

And that can be a tricky business. If the candidate who lost the election turns out a winner in the recount, the cost of the recount - at least $125,000, according to Mahan - is borne by the state's cities and counties.

But if the loser is still a loser, the humiliation of the loss becomes worse, for he must pay for the recount.

And there is no such thing as a partial recount. If a candidate thinks the count incorrect in only one area, for instance, the whole state's results are recounted anyway.

Generally, the recount procedure has called for local election boards to submit their records and ballots to the tribunal, which supervises a recount by two teams, each representing a candidate.

Until the court declares the recount complete and declares a winner, Virginia has no senator-designate.

But Gov. John N. Dalton and state Attorney General Marshall Coleman said yesterday that they do not expect the process to prevent a winner from being named in time to succeed outgoing Sen. William Scott in the next Congress.

Finally, there is always the possibility of a tie. The last one on record occurred in 1971, when Republican candidate William H. Moss Sr. appeared to have lost a state delegate's race in Fairfax County's 19th Legislative District. In the recount he demanded, the race came out dead even. Moss was ultimately declared the winner under state procedures that call for the victor's name to be drawn by lot from a bowl.

The bowl used, in somewhat typical Virginian style, is a silver loving cup.