Sometimes those funky California Raisins, who became famous by dancing on television to the tune of "I Heard It Through the Grapevine," seem like they're everywhere. Just ask Gerry Dunne.

Last month, Dunne got a judge's order to stop a Brooklyn company from selling counterfeit T-shirts emblazoned with the Raisins' likeness. Moments after leaving the courthouse, Dunne spotted a person wearing one of the contraband shirts."I couldn't believe it," recalls Dunne, a lawyer for the California Raisin Advisory Board, which holds the trademark to the animated clay figures. "We had an order in our hands from the judge and then this person comes walking by. I wanted to rip the shirt off their back."

Counterfeiters are increasingly ripping off the $52 billion licensing industry, which often uses such popular characters as the Raisins, Roger Rabbit or Spuds MacKenzie to sell everything from children's lunch boxes to trendy sportswear to dashboard sunscreens. In the last two years, U.S. Customs officials say, seizures of counterfeit items have more than doubled nationally with an estimated value of $22.5 million - and they have jumped nearly five times in the New York area to more than $5 million.

With untold millions of dollars at stake, however, companies such as Walt Disney and Coleco - usually identified with Mickey Mouse watches and Cabbage Patch dolls - are getting tough and going it alone in the war against counterfeiters.

In the past few years, these companies have hired top-flight lawyers to seek hefty fines against counterfeiters or, with court approval, to seize merchandise from their warehouses. Many companies also are using private eyes and relying on high-tech surveillance devices such as video cameras and hidden microphones. One has even hired Mel Weinberg, the FBI's "sting man" in the

ABSCAM probe, to be their middleman and try to catch counterfeiters.

"My feeling is that a lot of companies are becoming more aggressive in protecting their trademarks," says Dick Brennan, president of the International Anti-Counterfeiting Coalition, a Washington-based industry group. "There's great value to be preserved." In a matter of days, millions can be lost to sophisticated counterfeiters who get their phony merchandise out on the streets before the licensed items arrive, say Brennan and other experts.

"With something like a movie character, you will inevitably seek a court order for seizure of counterfeit merchandise," says Gary Hecker, a Los Angeles-based lawyer who has been involved in more than 20 "stings" against counterfeiters. "It's not unusual for private counsel to set up a sting operation - in cooperation with U.S. marshals - to seize the counterfeit merchandise anywhere from the boardwalk on Venice Beach in California to a T-shirt vendor standing outside Madison Square Garden in New York."

Many of the companies say they're becoming quasi-cops because federal authorities are swamped with more pressing concerns. "With the Mafia and drugs and theft of military secrets, these probably rank higher than someone selling counterfeit Gremlins or Batman dolls," says J. Joseph Bainton, a Manhattan lawyer who guards Warner Brothers' trademarks.

Experts say most counterfeit goods are being smuggled in from the Far East - from factories in Korea or Taiwan to cotton-weaving mills in India and Pakistan. And when the counterfeiting is domestic, it's sometimes done with the financial backing of organized crime or by hucksters looking for a quick buck, say law-enforcement authorities. Much of the illicit cargo is durable goods, like luggage that imitates the expensive Louis Vuitton brand or look-alike Rolex watches. But the foreign smugglers also have become adept at quick-hit merchandise, sometimes anticipating Americans' tastes.

When Steven Spielberg's "Gremlins" movie opened in 1984, the pirates were ready."There was great confidentiality on what the figures in `Gremlins' would look like," says Warner Brothers' lawyer Bainton. "And yet, there were counterfeiters who had stuff out within days after the movie opened."

The more popular a character, the more widespread an effort will be needed to catch counterfeiters, experts say. Take Dunne's effort, for example, to protect the California Raisins trademark.

Since the Raisins began strutting across the tube in 1986, lawyers for the California Raisin Advisory Board have filed more than 40 separate lawsuits against alleged counterfeiters. Nationwide, Dunne has a bevy of private eyes on the lookout, searching flea markets, specialty stores and warehouses. And in New York, customs officials have made more than a dozen raids at local ports against fake Raisin-like merchandise.