Dr. Charles Markham Berry, a prominent Atlanta psychiatrist known for his Christian counseling and volunteer work at local orphanages, was sentenced last month to 20 years in prison on federal and state charges of child molestation and child pornography.

At Berry's federal trial, U.S. Attorney Stephen Cowen said that "the evil that Dr. Berry has done in his life totally overshadowed the good. He wrapped himself in religious piety and used his position in the church and the community to shield himself and . . . to find children . . . to seduce them."

The investigation of Berry, 66, began late last year when the U.S. Customs Service intercepted child pornography he had ordered from Europe in the names of friends, traced it to him and obtained a warrant to search his home.

Berry's sentence, one of the toughest imposed in such a case, has been hailed as a major victory for a project in which Customs is working with other federal agencies and local authorities to monitor the activities of persons who buy child pornography.

The project, agents say, is having an impact. Among their other recent successes:Peter Gus Sotos, the publisher of an internationally circulated magazine, was arrested last December on child pornography charges following an investigation by Customs agent Jack O'Malley and the Chicago police. His magazine specialized in descriptions and photos of torture, mutilation and murder of children. The first issue opened with the words, "Child abuse is a sublime pleasure." He is awaiting trial.

The Sotos investigation began when Scotland Yard discovered the magazine at the Edinburgh home of a suspect in a series of brutal child abductions, murders and grave robberies. A Boston man arrested in March on child pornography charges was found to have sexually abused his four children. Two Chicago high school teachers were indicted in March on 161 charges related to sexual exploitation and child pornography, following an investigation by Customs, the U.S. Postal Service and local authorities. Prosecutors said the teachers molested eight students and took photographs for a pornographic magazine sold internationally.

These investigations start when Customs -- the agency with authority to examine items crossing the border -- intercepts mail from the major pornography-producing countries in Europe and the Far East. When child pornography is found, by using a profile of what it looks like and where it comes from, the agents make a "controlled delivery" to the addressee.

Later, using a warrant, agents search for the pornography and for evidence, such as mailing lists, linking the suspect to other pedophiles -- adults who prey on children for sexual purposes.

Customs officials said the project, which started last October, has produced evidence that many more Americans are buying child pornography than previously suspected and that many of them are also involved in sexually exploiting children. John Sullivan, who heads Customs' Child Pornography and Protection Unit, said the number of active child pornography cases has risen from 12 for all of 1983 to more than 220 so far in 1986.

Sullivan said that in more than half the cases agents have found evidence that the suspect was an active pedophile. He said most cases involve abuse of a number of children, with some suspects having molested more than 100. At the first sign of abuse, he said, local authorities are called in.

Sullivan said the United States is the world's leading consumer of child pornography. He said Customs has located 20,000 Americans -- about 97 percent of them male -- who are buying the material, either from domestic producers or from large-scale operators in such countries as the Netherlands, Sweden and Denmark. Customs also has discovered that European magazines contain a growing number of obscene photos of children identified as Americans.

When Customs agents and local police searched Berry's house in April, they found secret compartments containing thousands of photos and videotapes of boys between 8 and 13 engaged in sex acts, many of them with Berry. Investigators believe Berry molested children for more than 20 years.

In his basement, agents said, Berry had a photo studio equipped with floodlights and stuffed animals. Investigators also found a sophisticated computer system where Berry kept the names and descriptions of boys he molested. He was also preparing a manuscript describing his activities.

Sullivan said the material being intercepted is so upsetting that Customs limits agents' assignments to the unit to three years.

"It begins to get to them after a while," he said. "After you interview a child of 6 and they tell you about things you didn't know about until you were 18 or 20, it gets hard to leave it behind at the office. You begin to ask yourself, 'God, is the whole world sick?' "

Under federal law, it is illegal to produce, distribute or sell child pornography. There is no federal statute banning possession of child pornography, but in about eight states possession is a felony.

Customs Commissioner William von Raab said that although his agency has responsibility for stopping contraband as it crosses the border, the child pornography campaign started almost by accident in 1983 after clergy at a White House meeting asked him to look into it. He said most of his agents do the work part-time, with many working on their own time.

"It became clear that the amount coming into the country was enormous," von Raab said.

Agents who handle the cases said they expected the pedophiles to be "weirdos off the street." Instead, they are finding doctors, lawyers, clergymen and engineers, as well as people in close contact with children: teachers, camp counselors, playground directors, day care workers.

The material is very expensive, Sullivan said, ranging from $10 or more for a picture to $5,000 or more for a master videotape suitable for copying. Sullivan said Customs has seized collections worth hundreds of thousands of dollars. He said pornographic magazines offer cash or free subscriptions to persons who mail in home photos of children engaged in sexual acts.

Many pedophiles operate through a network of computer bulletin boards listing such things as a child's name, address, physical description and sexual "preference." Agents say that some pedophiles will tire of a maturing child and pass the boy or girl along to a friend who prefers older children. Agents say pedophiles also use the computer networks to trade items of child pornography.

Many pedophiles keep elaborate records and files, often on home computers, Sullivan said. "They usually collect their own most damning evidence."

Customs agents said pedophiles rarely show remorse. Such groups as the New York-based North American Man Boy Love Association campaign for the legalization of sexual activity between men and boys. Von Raab said the organization's newsletter has advised on ways to smuggle child pornography past the Customs inspectors.

Investigators say the children are injured physically and mentally. Without psychiatric counseling, many go on to become child molesters, and some boys and girls become prostitutes.

Pedophiles generally don't use force on their victims, Sullivan said, adding that it is not difficult to break down children's defenses, especially with the very young. "Children are very trusting," he said.

Sullivan said that once the children submit to the sexual activity, molesters use threats to prevent them from telling parents or authorities.

"One little girl told me she didn't tell because the molester told her he would chop off her daddy's hands and that no one would ever love her again. He said, 'You'll never get another hug,' " Sullivan said.

Customs is working to trace the European pornography back to the source so it can crack down on producers and distributors.

Agent John Forbes, who is based in Bonn, said the operation has been so successful that European distributors have begun using false return addresses to try to confuse investigators. Forbes added that European dealers are so intimidated that they require references for new customers.

He said official cooperation in Europe has increased dramatically. Sweden and Denmark have outlawed child pornography since about 1980. A law against it went into effect in the Netherlands last month.

"Until last fall, you could walk into any porn shop in the Netherlands and pick the stuff up," Forbes said. Now, it is "virtually impossible" to find.