When Congress was setting its spending-cut targets last month, Rep. Phil Gramm (D-Tex.) warned members they were "shooting with real bullets," setting out on a deadly serious, O.K. Corral kind of attack on the federal budget and the programs it finances.

Now those bullets are ricocheting through the Capitol, and most do appear to be finding their targets. But some lawmakers, dodging the strays, are beginning to feel like reluctant stand-ins for a shoot-out between the Keystone Kops and the Marx Brothers.

Partly because of the system of accountancy in use, some committees are getting credit for cuts that are more cosmetic than real. Others are making real cuts without getting any credit. It won't be clear for some time where the balance lies, but the smart betting is that real savings may well fall short of the $35 billion that Congress promised in spending cuts last month.

For many programs, perhaps more than many lawmakers thought likely when the targets were set, genuine cuts are being proposed as legislative committees try to meet their targets for spending cuts by a congressionally-imposed deadline of this Friday.

From child nutrition to old-age pensions, from foster care to Medicare, legislative committees are proposing sweeping, substantive cuts in long-established programs that were considered virtually sacrosanct as recently as a year or two ago.

"We've been pleased with the results so far," said Rep. Ralph Regula of Ohio, ranking Republican on the House Budget Committee task force that is overseeing the budget-cutting drive. "The indications are that most of the committees are coming up with real cuts . . . they're seriously trying to reach the targets."

But nothing is ever totally tidy and straightforward where Congress and its handiwork are concerned. So it's probably no surprise that some of Gramm's guns are backfiring and others are turning out to be pop pistols.

On the surface, what Congress is trying to do is quite simple.

Under budget targets adopted last month, each of 14 committees in the Senate and 15 committees in the House is supposed to come up with a specifically allotted share of the more than $35 billion that Congress pledged to cut from programs to meet its target for spending in fiscal 1982.

For the cuts to mean anything, they have to be measured against some specific, uniform benchmark. So the Congressional Budget Office came up with a "baseline" figure for each program that estimates what spending would be under current law adjusted from projected inflation rates over the next three years.

The baseline is admittedly arbitrary.Budget enforcers in Congress say that it has to be in order to work. "If we start making revisions, we'd face challenges all up and down the line," said Rep. Leon E. Panetta (D-Calif.), who heads the Budget Committee's task force on "reconciliation," which is the formal name for the process of cutting spending to meet budget targets.

Some committees are growling over the inequities that have resulted. Others are merrily accepting the inevitable.

Among the aggrieved is the House Banking Committee, which finds itself proposing a huge cut in the projected U.S. contribution to the International Development Association, an arm of the World Bank, and getting no credit for it.

For largely technical reasons, funds to finance the country's latest installment-contribution to IDA were not included to a stopgap funding resolution for the government that was passed by Congress last year.As a result, the baseline figure for IDA was computed at zero, even though President Reagan, in his slashed-back budget, had anticipated spending $850 million on the program next year.

The Banking Committee is proposing to spend only $271 million on IDA. But instead of getting credit for savings, it even has to count the $271 million as extra spending and make offsetting cuts in other programs within its jurisdiction, probably from housing and urban programs.

"The reality is that the committee would get no credit even though there is a legitimate cut," noted Panetta sympathetically.

At the opposite extreme is the House Agriculture Committee, which can count about $450 million in savings by claiming to have reduced dairy price supports from 80 to 75 percent of parity, even though Congress has in fact already done that and the 80 percent level had been due to expire, in any case, this summer. "So it has enormous unreal savings," conceded Panetta.

"It hasn't happened all that much," explained Panetta, "But creative use of the baseline could result in shadow savings all along the way."

On balance, Panetta and others said, the baseline gives many committees morfe leeway than they anticipated. Thus the savings are easier to come by, although they may be less "real" by some people's definitions.

The baseline problems are not the only ones.

Another has been posed by proposals for "off-budget" funding schemes for the Strategic Petroleum Reserve, whereby the energy committees of the two Houses could claim $3 billion or more in savings and still have some kind of quasi-government financing for the reserve.

That, said Panetta, would run afoul of the Budget Committee's ground rules. If it is attempted, the Budget Committee could draft an amendment for consideration on the floor to discount the savings.

Another possibility for fudging lies in the fact that some programs are essentially dually authorized. So a committee could propose killing one authorization, while leaving another alive to be utilized by the appropriations committees later in funding the program.

One congressional aide, asking not to be identified, said cancer research funding is an example. It is authorized both by a half-century old public health service law and by more recent legislation specifically aimed at cancer research efforts. He said some education programs fall in the same category.

The budget committees are poised to pounce on any evasions of this kind, but some could theoretically slip by. "These are the kinds of things you usually find out two months after something is signed into law," said the congressional aide.

However, as the aide noted, budget rules require that any appropriations bill that exceeds spending targets be shelved until it is pared back or until a final budget resolution is adopted in the fall, thereby cuting off some evasive tactics.

In case there is a sudden surge of "creative accounting," as administration budget director David A. Stockman calls it, Republicans in the House are quietly working on substitute proposals for consideration on the House floor to assure that Reagan's budget totals are met.

Such a substitute could also be the vehicle for the administration's proposals to combine nearly 100 separate health, education and other programs into block grants to the states. Even without program consolidation through block grants, the budget cuts make major substantive changes in government programs and policies. By resorting to block grants, thereby shifting enormous responsibilities to the state and local governments that would administer the grants, Congress would be making even more sweeping changes.

Most committees are balking at including the block grant scheme in their reconciliation offerings. And several Republicans said block grants are sufficiently controversial within the GOP that any substitute would be jeopardized if they are included.

A Republican substitute is basically a "fallback" strategy, according to Regula, in case the budget cuts, which are to be assembled into an omnibus package, are unraveled by a lot of floor amendments. It is the Rules Committee, dominated by the House Democratic leadership, that will decide what amendments, if any, to permit on the floor, although the decision can be reversed by the full House.

House Speaker Thomas P. (Tip) O'Neil Jr. (D-Mass.) has said the House must have an opportunity to vote separately on at least some critical cuts, but many Democrats are leery of being tagged as obstructionists if they do so. Panetta said any zeal or floor amendments appears to be declining as committees figure they can at least control spending priorities within their jurisdiction if they make the cuts themselves.

Although the Democratic-dominate House is considered more likely than the Republican-controlled Senate to indulge in "creative" budgeting, the potential for mischief is almost everywhere, especially as the deadline for the cuts approaches.

Reflecting at a committee meeting the other day on the likelihood that the final bill will approach 2,500 pages, covering the government from stem to stern, Senate Budget Committee Chairman Pete V. Domenici (R-N.M.) cautioned against adventurism in designing the cuts. "Lord knows what we're going to get," he said. CAPTION:

REP. PHIL GRAMM . . . "shooting with real bullets"; Picture 2, REP. LEON E. PANETTA . . . committee gets no credit for huge cut