Nagaoka, Japan — ''Public opinion is votes,'' said former Premier Kakuei Tanaka as he prepared to leave his home near here for a day of campaign speechmaking. ''It's not what the newspapers say. When all is said and done, it's people's votes that count.''
The former premier, the focus of the general election coming up Dec. 18, seemed in pugnacious good humor as he spoke to newsmen in his usual growly, bulldog voice.
Having been convicted Oct. 12 of bribe-taking in connection with the Lockheed scandal of the mid-1970s and having been sentenced to four years in prison, Mr. Tanaka is free on bail pending the outcome of his appeal. He cannot absent himself from Tokyo for more than three days without the court's permission.
But his visits to his constituency in the snowbound mountains and valleys of Niigata some 150 miles northwest of Tokyo seem to refresh Mr. Tanaka more than any holiday in the sun.
In national terms, political morality is the chief issue of the election campaign, and Tanaka's refusal to step down after his conviction is the main target of opposition parties' attacks. Here in the third district of Niigata, the former premier is determined to prove that he remains the overwhelming first choice of the electorate.
''You know,'' he said in an hour-long speech to some 500 rural supporters sitting comfortably on the tatami floor of a local assembly hall, ''I'm no ordinary MP. Resign one day, be reelected the next - if I did that, people said, the wind might not blow so strongly against me.
''But I can't lend myself to that kind of clever trick. After all, I was once the prime minister of Japan. I restored relations between China and Japan. I signed treaties with other states. How could I lend myself to some sort of cheap compromise?''
(He was referring to a strategy suggested by Prime Minister Yasuhiro Nakasone and other Liberal-Democrat leaders. They knew the Oct. 12 court ruling would unleash a storm of public criticism of Tanaka and of the Liberal-Democrats centered on the question of political morality. It was suggested that as soon as the court decision was announced, Tanaka should resign his Diet seat.
(Almost immediately thereafter, Nakasone would dissolve the Diet and hold new elections. Tanaka, who is appealing his sentence, could run again and if he was reelected, as is almost certain, the party could then explain that it was the voters themselves who had spoken.)
The growl that is Tanaka's natural speaking voice turned to a purr as he basked in the warm applause of his audience. He was with his own people, in the district from which he first stood for the Diet 36 years ago.
Here every town, every village, can boast of a road or a bridge built with funds lobbied for by their local boy made good. Here Tanaka, a self-made man who worked his way through night school, stitched his election machine together, hamlet by hamlet, in blocs of 50, 70, 100 votes. He knew the hard life of his constituents in their snowbound villages.
One of the former prime minister's constituents said, ''I can't believe Mr. Tanaka is guilty of wrongdoing. He doesn't spend money on himself, but to benefit others. And anyway, that Lockheed money he's accused of taking - that's not Japanese taxpayers' money, is it? It was a contribution from abroad.''
Actually, the relationship between Tanaka and his constituents is not so comfortable as this remark might indicate. To begin with, Japan is one of the few countries in the world with a multi-seat constituency system.
The third district of Niigata has five seats, and a voter has just one vote. He is not just choosing which party to vote for, but which particular candidate of that party.
It goes without saying that Tanaka has been the top vote-getter in his district for many years. But for the Liberal-Democrats as a party, the important thing is to get as many of the seats in the constituency as possible. Other Liberal-Democrat candidates in the district resent Tanaka's taking what from their standpoint is an unnecessarily high proportion of the total votes.
This time Mr. Tanaka is being challenged by a rank outsider, the novelist, entertainer, and amateur politician Akiyuki Nosaka. Mr. Nosaka does have valid Niigata connections: His father was once deputy governor.
Not only does Nosaka attack Tanaka directly on the issue of political morality, but also he brings up uncomfortable economic questions.
Now that all the roads, bridges, and tunnels the third district needs have been built, what next, he asks? The construction boom is over, and employment has declined from 38,000 during peak years to 22,000. Should not Niigata develop new industries instead of depending on the declining largesse of a boss fallen on hard times?
In quiet country lanes and in crowded shopping centers where the candidate must contend with ''Jingle Bells'' and seductive year-end bargain promotions, men with hard hats and women carrying babies and shopping bags stop, listen, and politely decline comment. Nosaka does not expect to unseat Tanaka, but will he cut significantly into Tanaka's vote totals, say by 20,000?
Niigata voters are notoriously close-mouthed to outsiders. So far, even practiced pollsters hesitate to predict what effect the Nosaka challenge will have on Tanaka's prospects.