Charles Cowan, a U.S. Census Bureau statistician with a fertile imagination, knows the idea sounds odd, but he insists that he can count homeless people the way game wardens count fish or deer.

Under a sophisticated estimation procedure called "capture-recapture," derelicts on skid row should act like trout in a mountain lake, moving at random in a way that allows their total number to be derived from two small samples. Cowan once almost won a federal grant to try the trick in downtown Columbus, Ohio, but the expensive clerical costs discouraged sponsors.

It was one more false start in a frustrating, sometimes almost comic, two-year struggle to find a way to count the homeless, whose numbers remain a mystery even while the government spends $70 million a year to ease their plight. The desire to wrap a phenomenon both evident and elusive into a manageable package has been key to the federal effort to help the homeless and provided the root cause of the effort's disarray.

The most painstaking effort to count homeless people, a $138,000 Housing and Urban Development Department study conducted last year, has taken such a political beating that the federal government appears to have given up trying to define the problem.

"I haven't seen any serious research efforts since," said Anna Kondratas, a Heritage Foundation analyst who recently completed a major review of literature about the homeless.

The HUD study estimated the number of homeless nationwide at no more than 350,000 -- and the federal agency went to great lengths to buttress that number from all sides. But the political and legal uproar it created seems to prove that the issue is so politically charged that even a careful attempt to measure the problem is unlikely to be accepted.

Politicians have exploded in anger at the frustrating search for a number to quantify the problem. "The real question gets down to -- not whether the numbers . . . are 300,000 or 3 million -- the real question is, what are we going to do about it," Rep. Bruce F. Vento (D-Minn.) exclaimed at a congressional hearing last year.

Rep. John Patrick Hiler (R-Ind.) registered a mild dissent during the same meeting. "Without having at least some idea of what numbers might be, it is difficult to determine how much money should be spent."

Hiler neatly framed the dilemma that has confronted federal officials since homelessness became large enough in the public mind to demand a response. And the government's one serious effort to count the homeless illustrates the maddening course that federal policy-making has followed since then.

Until early 1984, when HUD began to try to count the homeless, newspaper editorialists and political speech writers had generally used an estimate of 2 million people. The source of this number was the Community for Creative Non-Violence in Washington. Mitch Snyder, the group's best-known member, has become a vocal advocate nationally for the homeless.

The group has said that its estimate was based on "information received from more than 100 agencies and organizations in 25 cities and states," but it has resisted requests for more detailed background. Even Snyder has ridiculed the number, calling his and other estimates "meaningless."

"We have tried to satisfy your gnawing curiosity for a number because we are Americans with western little minds that have to quantify everything in sight, whether we can or not," he told one congressional hearing.

Still, the 2 million figure became a bench mark against which other numbers were compared. HUD Team Checks 2 Million Estimate

In 1983 HUD Secretary Samuel R. Pierce Jr., faced with many requests for more information on homelessness, ordered a study by the department's office of policy development and research. This team of statisticians and survey analysts began to check Snyder's 2 million estimate. They approached the problem from several directions, as if they were trapping a rare species of antelope.

Jack Underhill, 53, an analyst long attuned to the mysteries of statistics, had been with HUD for 20 years, much of that time spent tracking the development of new towns. In the homeless survey, he was assigned to the group canvassing 60 metropolitan areas by telephone. They included major cities such as Los Angeles and New York where derelicts were known to congregate, as well as smaller cities -- Annapolis, Md., Danville, Va., and Lompoc, Calif. -- where the problem might not be so noticeable.

The HUD team made more than 500 calls to local politicians, housing authorities, homeless advocates, charity representatives and university researchers. Each estimate of the number of homeless in the area on an average winter night was given a statistical weight. A guess by a city council member who had never visited a shelter would have less impact on the final figure than a charity worker's calculation based on an actual head count of shelter residents and street-corner derelicts.

Some staff members followed up the telephone calls with local visits. Underhill stopped in Denver, Seattle, Salt Lake City and Cleveland as well as Los Angeles.

In Los Angeles, Underhill found that one local study had been completed. In February, Marge Nichols, research director for United Way in Los Angeles, had polled a group of local experts to reach an estimate of 24,928 homeless for Los Angeles County. She noted that a local hot line received 12,214 emergency shelter requests in 1983, a sign of the problem's severity even if one case might stimulate more than one call.

Other local experts were less sure. Los Angeles Deputy Mayor Grace Davis discounted one estimate of 30,000 homeless in Los Angeles. "If we had that many," she said, "they'd be wall-to-wall on the streets." Police squads dispatched to count people sleeping in the open one night last January found only 700 in the whole city, to add to the city's overnight shelter population of about 2,000.

Underhill personally learned the weaknesses of such counts during his regular 6 a.m. jogs in the streets near his Wilshire Boulevard Hotel. He found four parked cars with overnight occupants still asleep, the homeless of the highway generation difficult to detect in the dark.

But armed with interviews with more than 40 shelter providers and officials throughout the area and having visited several shelters, Underhill came up with an estimate for Los Angeles of 31,300 to 33,800. He considered it fair and defensible.

Armed with similarly diverse expert opinion from the 60 rated cities, the HUD team made several statistical adjustments to its raw data to account for all cities and produced an estimate of the number of homeless people in urban America: 210,000.

There was more to do, however.

HUD had to add an estimate for rural areas, ultimately settling on 44,000. That meant an estimated national total of 254,000 homeless people.

HUD then paid a survey research firm, Westat Inc., $32,000 to survey shelter operators throughout the country and determine their capacities, the kind of people they served and their own estimates of the number of homeless in their areas. Working from 25 booths on the first floor of the firm's white four-story building in Rockville, the Westat interviewers reached 184 shelter officials. Their estimates of total homeless in shelters and out, statistically adjusted as the local expert estimates had been, produced another total: 353,000 homeless.

Kathleen Peroff, who headed the HUD team, acknowledged that shelter providers might be tempted to inflate their estimates to ensure future funding but insisted that they are one of the best sources available. Stephen K. Dietz, the Westat vice president, said his interviewers told him the shelter officials were so careful that they often excused themselves from the telephone to check records before answering some of the 23 questions read to them.

Still the search for the most accurate number continued. HUD team members searched newspapers and magazines, research studies and congressional reports for the highest recent estimates for homelessness in each locality. Taking published estimates for homeless in cities across the country produced the highest of the national homelessness totals in the study: 586,000.

Peroff said she realized at the time that accepting newspaper estimates was "pretty crazy," but she wanted to make a point. "What we were trying to do is say, if we take the highest numbers that have ever been published, we still don't get 2 million."

Two other estimates were produced, based on other calculations. These put the number of homeless at 192,000 or 298,000.

The fragile nature of these careful estimates became apparent at one congressional hearing when the HUD team discovered that someone had punched the wrong button on the calculator, which changed one estimate by 31,000.

With totals ranging from 192,000 to 586,000, HUD then concluded that "as best as can be determined from all available data, the most reliable range is 250,000 to 350,000 homeless persons." Methodology Remains Controversial

The search, apparently, was over. But the team's methodology remains controversial. Snyder, who has accused Peroff of criminal perjury and filed suit against HUD to withdraw the report, called it "the most sloppy, imprecise, unprofessional, inaccurate and misleading 'study' that I have ever seen" and said it was produced to suit the Reagan White House's budget-cutting policies. He also produced a former Westat interviewer who cited inconsistencies in data collected from shelter operators in the same area.

Kondratas, in preparing her Heritage Foundation report, noted how little information Snyder had presented about his methodology and how some of the homeless estimates he provided seemed to back up HUD's work.

Other professional researchers, like Richard Ropers of the UCLA School of Public Health, say the 2 million estimate may be a fair approximation of the number of Americans who find themselves without shelter at some point during a year.

The HUD team had anticipated criticism. Its members had worked in Washington long enough to know that, with a presidential campaign under way, and newspapers routinely using Snyder's estimate of 2 million homeless, their new number could cause an uproar. "People were going to kill us," one official warned.

The team went over its figures several times, but came up the same result. One team member momentarily thought of the possibility of fiddling with the methodology to make the totals seems higher, but gave it up as senseless and dishonest. "We decided that's the way it is," the researcher said.

When the Federal Emergency Management Agency tried to determine how much homelessness had increased this year, it avoided using the HUD figures as a base line -- and used no base line at all. "We count more and more homeless people every year," it concluded, "but they still remain largely uncountable."