Tourists flocked to this resort city in record numbers this summer, giving most merchants a banner season but offering little relief for frustrated condominium salesmen or police trying to crack down on noise, local officials said.

City officials estimated the Labor Day weekend crowd at 272,974, well above the 239,456 reported a year ago. According to city "demoflush" tests, which measure population by the amount of water consumed, a new record of 304,661 people here was set on the second weekend of August, easily beating last year's record of 276,914. That same weekend, the Bay Bridge had record traffic of 3,468 cars traveling across in one hour.

The big crowds didn't bother Margaret Keyes, Louise Flesher and Betty Gallagher -- "three widows from Waldorf," as they described themselves -- while they sat on the boardwalk here eating funnel cakes last week. "We love people," Keyes said. "Last Saturday it was wall-to-wall. We don't want to be alone. We want to be where the crowd is."

Business people in Rehoboth Beach, Del., whose year-round population of around 2,250 goes up to almost 50,000 in summer, also reported a good year and gave credit to the weather.

John Kleitz, general manager of the Atlantic Sands on the Rehoboth boardwalk, said he has not had an empty room in the 82-room establishment since Memorial Day weekend. "We had the best summer in the hotel's history," he said. The weather was great, he said, but did not seem to be the key factor in filling the 27-year-old hotel: "I filled up even on rainy days."

Farther south, in smaller Bethany Beach, Del., Town Manager Dean Phillips also reported record numbers.

The June population of about 8,000 went to approximately 15,000 in August, with an additional 10,000 or so day-trippers thrown in.

"It's been a great summer as far as everything goes," said Jim Baeurle, promotions manager at the popular Bottle and Cork nightclub and bar in Dewey Beach, Del. "The weather has been in our favor . . . . The turnout's increased since last summer. Everybody's been doing pretty good business."

Indeed, the only people reporting bad business were people trying to sell condominiums. Curtis Stokes, of the resort real estate company Anderson-Stokes, blamed the 48 percent dropoff in his business on uncertainty over President Reagan's tax proposals, the problems encountered by Maryland's savings and loan institutions, adverse publicity about storms and erosion and skyrocketing insurance costs for beach-front homes.

"All of this combined and hit us at one time," Stokes said.

But he predicted the sales slump will be short-lived and said sales already are showing signs of recovery.

However, Bob Warfield of the real estate firm Moore, Warfield and Glick Inc., said his company here is enjoying record sales: 100 units sold in July, and increases in August, despite the reported slump.

"We're frankly quite pleased," he said. "The numbers look great."

Fears of erosion and hurricanes are greatly overstated, he said, adding that nobody has died in an Ocean City storm since 1910, when a man in a rowboat suffered a heart attack. "If you get in from the beach 50 feet, you're in good shape," he said.

Rentals, however, were doing fine. "August was just excellent," said Rose Whitt, rental manager at the company's office here. "When we had people we couldn't accommodate . . . we'd call other Realtors, and they wouldn't have any places either . . . . I think a lot of people ended up going home, or going inland to find a place farther from the beach. I'm sure they had a difficult time."

Indeed, crowds are always a controversial subject in Ocean City. "We need to solve some traffic problems, and we need to talk seriously about some planning schemes for the future," said Thelma Connor, president of the city's Hotel, Motel and Restaurant Association. Connor, who owns the 104-room Dunes Hotel on 27th Street, said, "We were at the far end of town" when she bought the property several years ago. "Now we're in the center of the hotel and motel district."

On the other hand, she said, "It's been a very good summer: There's been a lot of people here . . . . I haven't had a vacancy since June."

Police, meanwhile, were looking forward to the end of summer. "We've been busier this summer, in every aspect," said Capt. William Jones of the Ocean City Police Department, whose year-round force of 75 officers was beefed up to 195 for the season. "There's more people in town and, consequently, there's more problems."

The big complaint this summer was noise, he said, and police were cracking down. A special 12-man "tactical unit" armed with portable noise meters arrested about 200 people this summer, he said, most of whom received fines ranging up to $100 or were ordered to perform community service. "It's the No. 1 problem," he said. "It's not something that the dog-catcher handles."

Jones said the noise ordinance -- which forbids noises louder than 65 decibels during the day and 55 at night -- is three years old and replaces previous laws that depended on the unscientific testimony of offended neighbors. Now police stand at the edge of the offender's property and get a digital readout.

For the first year of the new law, Jones said, police issued a lot of warnings, "But we didn't really take enforcement action by arresting anybody." Last year, he said, police became "a little tougher," and by the time 1985 arrived, "We didn't feel quite as bad about taking some enforcement action."

As the crowds here increase, Jones said, more people seem concerned about noise. "I suppose as density increases, and more and more people move into town, there are more and more people that make noise -- and more and more people that hear noise and are disturbed by it," Capt. Jones said.

"It's been more crowded than last summer," said Lt. G.W. Mix of the Ocean City Beach Patrol, but the 85 lifeguards managed to keep things under control. They made 3,456 rescues, performed first aid 232 times, summoned 67 ambulances to the beach, handled 632 reports of lost children and had no drownings.

With summer winding down, Mix was preparing to take himself and his whistle back to the University of Pennsylvania, where he coaches lacrosse.

Several other lifeguards were heading south to guard the Florida beaches for the winter.

Others here, however, were happy to leave the beach behind. "I'm glad the tourists are going," said Colin Stierstarfer, who has been putting in 60- to-80-hour weeks pressing decals on T-shirts at Natural Shells II on the boardwalk.

"I'm going to go on a nice long vacation. I haven't had any days off for at least a month."