President Carter led Sen. Edward M. Kennedy (D-Mass.) tonight in Florida's Democratic Pary county caucuses, the first test of strength between the president and his expected challenger.

The Carter campaign claimed a possible 2-to-1 vicotory over the Florida draft-Kennedy movement, but based that on the uncertain premise that Carter had swept urban Dade County, which will account for 188 of the 878 delegates chosen today to attent the state convention in November.

Only a small fraction, probably less than 2 percent fo the state's registered Democrats were believed to have turned out for the voting.

With unofficial figures available from 64 of the state's 67 counties, Carter had 350 delegates, Kennedy 196, labor 19. Twenty were uncommitted.

The missing counties, in addition to Dade with 188 delegates, were Palm Beach with 60 and Hillsborough (Tampa) with 45. Kennedy was expected to do well in Palm Beach and Hillsborough was considered close.

Because the stakes in today's caucuses were mostly psychological, the Carter camp took a calculated risk in the battle for Sunday's headlines by claiming victory in time for the earliest editions of most newspapers, even though the results were too incomplete for anyone to be able to predict the outcome accurately.

Immediately after that, the Kennedy forces issued their own, more modest "victory" statement.

By the time the complete results are known, most of the national reporters will have left Florida and the story likely will be relegated to the inside pages of their papers.

Carter unquestionably did well in Dade County, considering the fact that it was supposed to have been a Kennedy stronghold because of its ethnic mix of Jewish, Hispanic and black voters.

On the basis of interviews with voters, Carter led Kennedy by 55 votes in Dade County. But at least 130 of the 4,200 who voted in Dade County refused to tell reporters who they supported. If Carter's lead holds up, he would win virtually all the 188 convention delegates at stake here.

It may be several days before the ballots in Dade County have been counted. Theoretically, Kennedy still could win a majority of the delegates, but he would need a near-sweep of Dade, Palm Beach and Hillsborough counties to do it.

Underscoring the president's strong showing in Dade County was the disappointment expressed by draft-Kennedy organizer Mike Abrams. "We should have clocked them here," he said, "We should have clocked them."

Kennedy did unexpecedly well in central Florida, a relatively conservative area of the state thought to be solid for Carter, and scored heavily along parts of the "Gold Coast" north of Miami, where Jewish voters are unhappy with the Andrew Young affair and Carter administration policies in the Middle East.

The Carter campaign chief in Miami, Jay Hakes, confident that Dade County would come through, informed the president at 8 p.m. that "you will probably win in the neighborhood of 60 percent of the delegates and we have a real shot at a two-to-one margin over Senator Kennedy."

Presidential press secretary Jody Powell, who was at Carter headquarters in Orlando, was even more vehement in his pronouncements. "The basic thing this shows is that anybody who challenges the president is in for a long tough fight every step of the way. The nomination is not going to be taken away from an incumbent president just for the asking."

Kennedy supporters in Miami were equally self-congratulatory in their statements. While they did not claim a numerical victory, knowing that Dade County is moving against them, Kennedy organization chairman Gerald Lewis called the results "a stirring testament to the support Kennedy has inFlorida. It's very close in Dade County but the strength of the Kennedy vote is amazing."

Speaking in Louisville, Ky., tonight Kennedy said that the Florida vote appeared "extremely close." He added that he was "very much heartened by all of the Floridians who turned out to vote."

Kennedy refrained from calling the Florida balloting a victory or a defeat. He said that the voters expressed "their central concern about the type of issues I feel deeply about," such as the economy and energy. Kennedy said " I was not able to campaign myself [in Florida] . . . and I was not able to develop our organization." He said the Kennedy forces there were strictly local, offering this as an explanation of why his vote was not larger.

The counting promblem was a function of the strange nature of this event. Registered Democrats voted not for Kennedy or Carter but for delegates representing each man. Armed with long slate lists provided by each camp, the voters were forced to make their choices from hundreds of possibilities on a ballot that looked more like a book.

Partly as a result of the effort that was required and partly because of the heavy rain that hit Miami this morining, the turnout -- especially in Dade County -- was much lower than the 10,000 predicted.

The contest, everyone agreed, was primarily a test of organizational skills and of the number of buses each camp could charter to transport delegates, like troops in a guerrilla action, to the polling places.

The straw vote at the convention in November will be decided on the basis of delegates chosen today and by approximately 800 additional delegates who already have been selected by other means, such as appointment by party officials. Carter is said to have most of those locked up, because he has, at the moment, overwhelming support from the state's party structure.

In Tampa, the Carter forces drew several hundred voters to a breakfast with the president's mother, "Miss Lillian" Carter, and had them lined up halfway around the courthouse square when voting began at 11 a.m.

Worried Kennedy supporters said they hoped their buses would be along later.

In St. Petersburg, the Carter aides used walkie-talkies to direct bus traffic for arriving and departing voters, but the turnout included many people who had not been contacted by either Carter or Kennedy forces.

Some of them, wearing union jackets, appeared to be backing the uncommitted "freedom of choice" slate which, in St. Petersburg, included 14 of the 55 Kennedy delegates.

Many of the voters in St. Petersburg said they had decided to come to the high school polling place on their own after reading and hearing the advance publicity about the event. They were vehement, in many cases, about their reasons for voting in the symbolic election.

Philip and Ethel Wilcox of Largo said they moved here recently from Wisconsin and came out because, as she put it, "I don't want Mr. Kennedy in there. All this big effort for a man who hasn't even declared himself makes me nervous. I don't think he told all that happened at Chappaquiddick either, and I don't want him getting ideas about the White House.

But farther back in the line, Samuel P. Watt of St. Petersburg was wearing a hand-lettered sign around his neck saying, "I've had enough of Carter. Hamburger 55c lb. then, $1.49 lb. now."

Watt said he supported Carter in 1976 but was voting for Kennedy today because, Carter "doesn't say the same thing any two times he talks. He tells business he's for high interest rates, and then turns around and tells labor he's against them."

Ernest Fillyu, a black delegate on the Carter slate in St. Petersburg, said, "Kennedy is not the man his brothers were. Jimmy Carter has done his best, and the best thing Kennedy could do would be to help him, not run against him."

The voting in Dade County created a strained scene unlike any other election. The auditorium in which about 4,200 people crammed to cast their votes resembled the floor of the New York Exchange, with campaign workers whooping and shouting to each other amid the crowd.

Each campaign unloaded its supporters from buses into "holding rooms," which more resembled refugee camps, littered with milling people and the remnants of refreshments given out as a lure to Dade County voters.

"Where's my free lunch?" a woman shouted at Carter campaign director Jack Walsh after casting her ballot for the presidential slate of 188 delegates. "You promised us a lunch if we got on these buses and I haven't had mine yet."