WALTER MONDALE can forget about Republican and independent votes. Victory for him hangs largely on one question: How many Democrats will vote for him and how many for Ronald Reagan?

For months now, 90 to 97 percent of the Republicans have been saying they will back Reagan. Few show any sign of defecting.

Independents as a group are also less important in this election than they once seemed. Almost all the so-called independents admit to leaning either to the Democratic or Republican parties in almost the same proportions as Democrats and Republicans do.

Despite all the talk about the growth of independents over the years, relatively few people -- about 6 percent of the voting population -- really think of themselves as totally independent from the two major parties. It is conceivable but highly unlikely that the election will turn on their votes.

Almost certainly the election is in the hands of the Democratic rank and file, especially those the political experts would call "weak" Democrats. If you don't believe it, look at how Reagan has been campaigning.

He links himself at every opportunity to Franklin D. Roosevelt, Harry Truman and John F. Kennedy. In recent weeks he has had White House commemorations for Hubert Humphrey and Eleanor Roosevelt, and he probably would have one for Mondale as well if he thought it would help. Endlessly, Reagan cites himself as the model: a Democrat who found it hard to switch but who finally saw the light.

That kind of campaigning is not aimed at Republicans.

Mondale, for his part, has been more restrained in his appeal to the same voters, and he has been hurt until now because of it.

To date, much of the challenger's pitch to Democrats has come in the form of counterattacks on the president. As Reagan kept invoking the names of dead Democratic leaders, Mondale charged that his opponent was guilty of "political grave robbing."

Mondale is having a difficult time formulating a message that can hold both the party faithful and the "weak" Democrats. Talk of fairness, protecting Social Security, Medicare and the like sits well with strong Democrats. Weak Democrats tend to worry about the cost.

Mondale has made some gains with Democrats in recent weeks, coming on gradually since his first debate with Reagan on Oct. 7.

At the beginning of the month, a Washington Post-ABC News poll showed Reagan getting 25 percent of the Democrats and Mondale 66 percent, with 9 percent undecided.

A new Post-ABC News poll, published last week, showed Mondale cutting Reagan's overall margin from 18 points before the debate to 12 points -- with almost all the gains coming from wavering Democrats. Now, according to the latest Post-ABC News poll, 22 percent of the Democrats say they intend to vote for Reagan and 75 percent for Mondale; 3 percent are undecided.

If Reagan keeps his current 22 percent of the Democratic vote, he stands to win comfortably. If he can get 19 or 20 percent of the Democrats to cross over, the margin will be narrow, but Reagan will still probably come out ahead.

On the other hand, if Mondale can cut the defection to 17 or 18 percent, the election could go either way. If he can cut it to 16 percent, he would probably win.

That, of course, is a tall order. It will take an enormous jolt, such as a very strong performance by Mondale in tonight's debate or an extremely poor one by Reagan or some other major setback for the president in the short time before Election Day.

Here is what is involved numerically:

Democrats may be expected to account for about 52 percent of all voters in 1984 (with Republicans at 42 percent and "pure" independents at about 6 percent). Those are the figures suggested by the latest Post- ABC News poll and other surveys. If 95 million people vote, as many are predicting, that means 49 million of them will be Democrats.

Right now, almost 11 million Democrats are on the Reagan side. Mondale has to take away 3 million.

Even such a wholesale shift among Democrats would not put Mondale ahead, by itself. But one assumes that if the weak Democrats desert Reagan in such large numbers, then -- and only then -- the pure independents and a few Republicans as well will follow suit.

Getting more Democrats away from Reagan will be anything but easy. According to last week's Post-ABC News poll, a 58 percent majority of Democrats who support Reagan say they are certain they will not change their minds on Election Day. The other 42 percent, however, the equivalent of 5 million voters, are less sure.

As a group, these Reagan Democrats are far more opposed than other Democrats to raising taxes as a means of reducing the budget deficit, a key Mondale proposal. Although many other voters have come to see Mondale and his running mate, Geraldine Ferraro, in a favorable light in recent weeks, these Democrats for Reagan -- even the wavering ones -- tend to maintain negative images of both while admiring Reagan.

Two-thirds of them are from working- class backgrounds, the ethnic, blue-collar Democrats whom Republicans since Richard Nixon have been going after so hard.

It's unlikely that 3 million such people will switch at this stage from Reagan to Mondale. Nevertheless, evidence that they might change their minds does exist. For one thing, it is they themselves who say they are not so certain of their vote. For another, two of every three of them say they will put great stock in the impressions they drew from the candidate debates. That is quite unlike the typical Reagan voter, who tends to say the debates do not matter at all.

The need for a Democratic candidate to make an extraordinary appeal to his party's rank and file may sound peculiar, but from what these Reagan Democrats are saying, that need is there for Mondale.