The U.S. nuclear stockpile totaled 23,400 warheads at the beginning of 1987, a decline of roughly 3 percent during the first six years of the Reagan adminstration and far fewer warheads than initially projected under the Reagan military buildup, according to secret testimony presented earlier this year to the House Armed Services Committee.

A declassified transcript of the closed-door hearings held last February was released last week.

"The initial stockpile projections of President Reagan essentially matched those of President Carter through 1988 and then projected a growth . . . into the early 1990s," according to material provided the committee by Adm. Sylvester R. Foley Jr., assistant secretary for defense programs of the Department of Energy (DOE), which runs the nuclear weapons building program.

"In successive years, the projections of President Reagan have grown smaller in total number," he told the committee, so that by October 1986 the stockpile stood at "fewer than the number forecast in President Carter's last projection."

Unilateral nuclear weapons withdrawals, retirement of old warheads and congressional limitations on new nuclear systems led to the stockpile reduction, according to the testimony from officials of the Defense Department and DOE.

The nuclear arsenal includes missile warheads, bombs, artillery shells, antisubmarine depth charges, antiaircraft rockets and land mines. The majority are stored in the United States, but others are stockpiled around the world.

Additional warhead reductions resulting from arms-control agreements will further reduce the stockpile. For example, production of W84 warheads for the 464 ground-launched cruise missile (GLCM) that were being deployed in Western Europe is still under way and programmed to continue next year. That nuclear system is to be eliminated under the intermediate nuclear forces (INF) treaty to be signed Tuesday by Reagan and Soviet leader Mikhail Gorbachev.

The number of warheads that make up the stockpile is one way to measure nuclear strength, but not the only way. The stockpile, for example, had already been reduced by 20 percent from the 1967 high of more than 30,000, but today's is recognized as more militarily effective. However, the import of the Reagan reductions are that they come from nuclear warhead levels projected by the administration's building program.

Government witnesses, arguing against a treaty with the Soviet Union limiting underground nuclear tests, told the panel of reliability problems of not only old, but also new warheads produced for still-operational weapons.

Their testimony differed markedly from that offered in past years when officials associated with the nuclear programs vouched for the complete reliability of the stockpile, including the strategic missiles in silos and aboard submarines.

Starting several years ago, however, when the Soviets proposed a halt on all nuclear tests, scientists associated with U.S. nuclear laboratories began discussing problems that had developed with the sub-launched Polaris and Posidon missiles to illustrate how testing had to continue.

Last February, James W. Culpepper, DOE's acting deputy assistant secretary for military applications, told the committee that problems requiring redesign were discovered in the Minuteman II land-based intercontinental ballistic missile just before its deployment in 1962 and more recently with the sea- and air-launched cruise missiles in their final tests before deployment. Even the GLCMs have had to be reworked, he said.

However, none of the officials argued that the lowered stockpile numbers or problems with warheads put the United States at a disadvantage with the Soviets.

The officials did, however, complain about the aging of the stockpile, which Robert Barker, assistant to the secretary of defense for atomic energy, said contained "a very disturbing number of weapons out there in the 20- to 30-year period."

As of last Dec. 31, Barker said, there were 27 different types of warheads in the stockpile with an average age of 12.79 years. Most nuclear weapons, according to government scientists, have been designed to last 20 years.

One-third of the U.S stockpile, he went on, is "less than 5 years old."

One cause of the Reagan stockpile reduction was the agreement of North Atlantic Treaty Organization ministers in 1983 to reduce by 1,000 warheads the U.S. nuclear force in Western Europe.

NATO officials hoped to make up the reduction later, and fill any gap created by the INF agreement, by modernizing nuclear artillery and other battlefield systems not covered by the treaty.

Some officials at the hearings sought congressional approval for a nuclear version of the proposed Army Tactical Missile System, or ATACMS, to replace the cruise and Pershing II missiles to be removed under the INF agreement. A 1984 amendment sponsored by Sens. Edward M. Kennedy (D-Mass.) and Sam Nunn (D-Ga.) prohibited any nuclear role for the ATACMS and Barker asked that it be repealed.

Also, in the wake of the neutron weapon controversy, Congess in 1985 limited the number of new nuclear artillery warheads that could be built to 925. Because the 925 "will not meet NATO or worldwide {U.S. military} requirements," Barker told the committee, "older weapons sytems will be retained."

Although the number of warheads in the stockpile is normally classified, the committee transcript carried the 23,400 figure because the Pentagon failed to delete the number in its security review. After the volume was released, DOE officials complained about the security violation to the committee staff.