President Reagan said yesterday that "I have been one of the strongest boosters" for general revenue sharing to local governments, but asked a legislative conference of the National Association of Counties, "How can we afford revenue sharing when we have no revenues to share?"

Reagan has proposed elimination of the $4.6 billion program, of which about $2 billion goes to county governments. The proposal has been a top concern of about 1,500 county officials attending the conference at the Washington Hilton.

"General revenue sharing has served us well," Reagan said. But he also asked the conference, "How can the federal government justify, strapped as it is with a deficit, borrowing money to be spent by state, county and local governments, some of which are running surpluses?"

The county officials were silent in response, and applauded lightly when Reagan added:

"I sympathize with your position on the issue. But the federal spending dollar is not magic and it certainly isn't free. It comes straight out of your pockets, and I just have to believe that, over the long haul, you'll be a lot better off with the federal government's hands out of your pockets."

In a speech preceding Reagan's remarks, Senate Majority Leader Robert J. Dole (R-Kan.) said he had resisted pressure for farm-credit relief because if just $1 billion is added for farmers now, "I think the whole ball game is over" as far as reducing the deficit. "We haven't cut anything yet," he said.