When the votes are counted in the Illinois primary Tuesday night, the outcome of the contest between Michael Brady and Michael Kreloff in the city's 49th Ward won't warrant even a mention by network television anchormen.

Brady and Kreloff are just two names on the long and complex Democratic primary ballot. But their race to be 49th Ward committeeman, one of the contests that counts because the job controls patronage, will have its own impact on the Democratic presidential race and even touch the aspirations of Republican John B. Anderson.

National politics are always affected by local issues, personalities and ambitions, but nowhere more so than in Chicago. For decades every election here has been a test of the ability of the local Democratic organization -- "the machine" to its enemies -- to deliver for its anoited candidates and thus retain and consolidate its power.

This year, Brady is the machine in the 49th Ward, a part of the North Side, lakefront, 9th Congressional District. Brady is an aide to Mayor Jane Byrne and his campaign for 49th Ward committeeman -- a key political job with control of ward patronage -- is one of Byrne's priorities on Tuesday.

Kreloff is the outsider. Associated with and supported by the state's largest organization of political independents, he is part of the long and usually fruitless tradition of "reform" challanges to the organization.

Like Brady, Sen. Edward M. Kennedy (D-Mass.) is the machine in the 49th Ward. Adopted last fall as the preferred presidential candidate of Byrne and the Cook County Democratic organization, he enters the Illinois primary with only one visible asset -- the small army of precinct workers at the mayor's command.

And this year, President Carter is in his familiar role as the outsider. In the 49th Ward, he is aligned with Kreloff and such unlikely allies as state Sen. Dawn Clark Netsch, a leading liberal in the legislature, a seemingly natural Kennedy supporter who is on the ballot as a Carter delegate.

Last fall, Kennedy and Carter courted the mayor for her support. Then at the height of his popularity, Kennedy won Byrne's endorsement, which turned out to be just one of the many mishaps that have befallen his presidential campaign. On Tuesday, Kennedy's hopes for a respectable showing in the Illinois primary will rest largely on the shoulders of a political machine that is in decline.

"There is a lot of turmoil in the Democratic Party here," said Daniel O'Brien, the Democratic committeeman in the 43rd Ward, another part of the 9th District.

The surest sign of that turmoil is in the ward committeeman races. These are the elections that really count in Chicago, for the stakes can be as high as getting a nice job with the city for a son or daughter.

There was a time, when the godfather of the machine, the late mayor Richard J. Daley, was still around that the question of the committeeman's job in most wards was settled internally, without the bother of a contested primary. But this year, there are Democratic primary fights for committeeman in 22 of Chicago's 50 wards. Six of those contests, including the Brady-Kreloff race, are in the 9th Congressional District.

Long before national attention focussed on the Illinois primary, this turmoil affected the Kennedy presidential campaign.

Specifically, the internal disputes in the organization meant that a number of prominent local Democratic officials were unwilling to become involved in the presidential contest by running as Kennedy convention delegates.

"There is so much stuff going on, some of these committeemen didn't want to stick their necks out," said Don Rose, a local political strategist. "They've got much more important things at stake than spending three days at the convention in New York."

One result of this is that the Kennedy delegate slate in the 9th District is made up mostly of political unknowns. The 9th District Carter slate, in contrast, is the president's strongest in the city.

Netsch is an example of the confluence of national and local politics in a place like Chicago. A liberal reformer, she is a leader of a group known in the Illinois legislature as "the Crazy Eight." For years, her bitterest enemy in Springfield was state Sen. Richard M. Daley, son of the late mayor.

But this year, Netsch is backing Daley in his race for Cook County state's attorney. This is because this year Richie Daley, of all people, is also an outsider, fighting the machine-backed candidate for state's attorney, Alderman Edward (Fast Eddie) Burke.

Going into Tuesday's primary, the independent, ticket-splitting liberals of the 9th District, which is heavily Jewish and a liberal stronghold, are a source of concern to Netsch. She is worried that far too many of them will ask for a Republican ballot at their polling places so that they can support Illinois native Anderson in his race for the GOP nomination.

The possibility of a large Democratic crossover vote for Anderson Tuesday has political operatives in both parties here nervous. While the overall effect of such a phenomenon is uncertain, there is a consensus that "the Anderson factor" could hurt Carter in the 9th District.

The theory is that the machine will turn out its loyalists for Kennedy and the other organization-backed candidates. Democrats who vote for Anderson are, by definition, nonmachine independents, outsiders, and, therefore, likely Carter supporters.

Netsch does not care deeply whether her liberal allies prefer Anderson to the president. But if those liberals decide to vote for Anderson, they will be participating in the Republican primary and will have no say in the Democartic races. And it is those other Democratic contests that Netsch cares about deeply.

Thus earlier last week, Netsch, the Carter delegate, found herself in the curious position of participating in a news conference at which Democrats who support Anderson were urged to write in the Republican congressman's name on the Democratic ballot Tuesday.

If enough people follow that advice it will hurt Carter in his "beauty contest" race against Kennedy.

But it will benefit Richie Daley and Michael Kreloff, and for Netsch that is far more important than the question of who Illinois voters prefer to be president.