In the war for television ratings, it's no longer just a matter of who wins and loses. It's also a question of who's keeping score.

As ABC, CBS and NBC entered the new season last week to compete for viewers, an equally fierce battle was going on behind the scenes of the TV ratings war.

A.C. Nielsen Co., the longtime keeper of the ratings ledger, is being challenged this year by AGB Television Research Inc. -- the American offshoot of AGB Research PLC, a British ratings company -- which has set up its operations center in a low-slung building in suburban Columbia, Md.

Both sides are using a new system of measuring who's viewing what when -- the so-called "people meter," a black box that sits atop the TV sets in several thousand American homes.

The people meters tally family members' viewing habits with the help of a handheld remote control device that each viewer is supposed to use to tell the people meter when he or she enters or leaves the room while watching TV.

The new system is billed as far more accurate and detailed than the old Nielsen diary system, in which viewers were supposed to jot down what they had watched. But the people meters -- and the battle between Nielsen and AGB -- have given the new TV season an element of competition, and confusion, that goes beyond the normal scheduling battles.

The stakes are high: The ratings determine the placement and pricing of more than $8 billion in television advertising a year. The rhetoric also has been high: AGB, which has been using people meters to compile TV ratings in Great Britain for years, claims to have the better system. Nielsen counters that it has signed up far more customers, including all three television networks to AGB's one -- CBS. Both companies claim their samples of 2,000 American television watching families most accurately represent the entire nation.

Network and advertising officials differ in their appraisals of the services the two companies provide, although most say they are watching both sets of numbers closely. So far, the ratings by the two firms have differed slightly on most shows, with AGB's tending to be a bit lower.

There have been rumors -- adamantly denied -- that Nielsen might try to snuff the competition by buying AGB. Further, in an effort to gain a competitive edge, Nielsen last week signed a contract with ABC that offers unprecedented guarantees of quality, with the possibility of refunds if the ratings service doesn't measure up -- a contract television executives say would not exist were it not for the arrival of AGB as a competitor. And Nielsen even has raided AGB for a key executive, although both sides minimize the effects of the defection.

Clearly, this is war.

"We're in there for the long haul," said Larry Frerk, a Nielsen spokesman. "We've been in there, and we plan to be in there forever."

"While they're good, we think we can be better," said Michael J. Poehner, AGB's president. "All people meters aren't the same. We think ours are far superior."

There's little question about who fired the first shot in the people meter battle. "I don't think we'd have people meters if AGB hadn't shown up," Poehner said. The company forced the issue two years ago with a test of the devices in the Boston market, then announced it would go national this year.

That forced Nielsen, whose diary system was coming under increasing criticism for being inaccurate and unrepresentative of the viewing population, to come up with its own people meter. Nielsen ran both systems last season, and with AGB breathing down its neck, decided this season to drop the diary system entirely -- much to the displeasure of many in the TV industry, who had hoped for a more gradual transition so they could become more comfortable with data produced by people meters.

"The market decision to move rapidly created a pressure situation for us in the 1986-87 season that was unnecessary," said Marvin Mord, director of research at ABC, a subsidiary of Capital Cities/ABC Inc.

Faced with the sudden arrival of people meters, all three major networks, and many other buyers of ratings information, such as advertising agencies and program syndicators, stalled. Most negotiated hard with the ratings companies for quality guarantees, and some didn't sign up until the last minute.

ABC, for instance, did not have a rating service under contract when the new TV season officially started last Monday; it signed with Nielsen a couple days later. (Advertising for the new season, the bulk of which was sold in early summer, was priced on the basis of last year's Nielsen data, and thus was relatively unaffected by the controversy.)

The data produced by people meters tends to be different from that generated by the diary system for a number of reasons. For one, the people meters are more precise -- by measuring exactly when and who watched television, they are capable of producing highly detailed demographic information.

In addition, they are considered superior to diaries because they are more immediate and contemporaneous. In many cases, researchers found, diaries were filled out several days after the fact, forcing people to remember who was in the room and what was on the tube. And people filling out diaries tended to say they had watched a show every week, even when they might have missed an episode. Such discrepancies can make for significant ratings changes.

"There's the potential that people won't push buttons. But we think that accuracy is far better than with diaries," Poehner said. "While there's potential for error because nothing is foolproof, it's light years better than the diary system."

AGB claims its people metering system is so sophisticated that it can actually tell when any of the families it monitors tapes a show for later viewing on a videocassette machine -- and then can report back when the tape is replayed, and even if the viewer fast-forwards through commercials.

The basic workings of the two systems are similar. In AGB's, for instance, the people meters in the 2,000 homes store up information on viewing patterns through the day then, at 2 a.m. local time, automatically phone the company's computers in Columbia to dump the data.

The computers crunch the numbers through the day, correlating the viewing figures with painstakingly detailed information on what shows were playing on each channel in each market the previous day. By mid-afternoon, AGB has produced the numbers most eagerly awaited on New York's Broadcast Row -- the previous night's prime-time ratings. They are sent over telephone lines to computer terminals at each customer's offices; more detailed ratings breakdowns are mailed out to clients.

CBS pays AGB $2 million a year for this service; Nielsen gets $4.7 million from each of the networks, although ABC is paying Nielsen $500,000 more for its guarantees and rebate plan. Ad agencies and other customers pay less, depending on their size and what they're getting. And AGB's price is a sort of special introductory offer -- next year, when the company's sample is increased to 5,000 homes, the tab will rise to $3.5 million. Nielsen also is planning an increase in the size of its sample.

Executives who have seen the early batches of ratings from the two companies say there are some differences between them and from historic ratings figures. For one thing, people meters tend to produce slightly lower ratings than did diaries. No one's sure why, although the two prevailing theories are that the people meter households are uncomfortable with so much button pushing or that the people meter figures simply are more accurate.

For the TV networks, the lower numbers are a problem, because they could reduce the prices the networks can charge advertisers for commercial time. "All we really know is that people meters tend to produce lower figures for shows, but if that's constant, over time, we can adjust," Mord said.

So far, AGB's people meters have tended to produce slightly lower ratings figures than Nielsen's, most likely because of differences in the make-ups of the sample audiences, or panels, used by the two companies. Experts say the science of putting together a representative sample of the national audience is the key ingredient in accurate ratings data, even more so than the people meter technology itself.

"The real effort is more on the research side, putting your panel together," Poehner said. According to Mord, the performance guarantees ABC won from Nielsen are almost entirely related to the quality of the sample. The network wanted to make sure that such key demographic areas as men and women between the ages of 18 and 49 are fully represented on the panels, he said.

"You have to have consistency in the data," Poehner said. "There can't be swings and fluctuations from week to week." If the sample does not match pre-established standards, Nielsen could be required to refund some of ABC's cost of the service.

Perhaps the best example of possible differences between the two panels has been in the ratings on professional football games. ABC's "Monday Night Football," for instance, drew an 18.7 rating from Nielsen -- meaning that 18.7 percent of the total TV audience was watching the game -- but only scored 15.2 in AGB's figures.

"That was the one place where we saw a fairly large difference between the two," said David Poltrack, vice president of marketing for CBS, the only network to subscribe to both services. "One of them may be off. It may be a male-oriented bias or it may be a sports-oriented bias."

Poehner said that in a similar difference in a preseason football game, in which Nielsen found a rating of 15.8 and AGB came up with 12.1, "our research showed that 12.1 was a lot more logical than 15.8. ... We've been fairly confident about what we've got."

Incidentally, TV executives believe people meters are better judges of ratings for football and other sports because in the past, family ratings diaries usually were filled out by women, who tended to omit sports events.

The differences in the ratings figures are expected to disappear as the two services iron out the kinks in their respective systems. Next year's increase in the number of homes being sampled also is expected to significantly reduce the margin of error. "If they both go through the process of refinement, at the 5,000-sample level you shouldn't see any difference between the numbers," Poltrack said. "Then I think the competition will be on service -- software, service, the ability to provide special surveys."

"The reason to subscribe to them both has been to get them to compete against each other," Poltrack said. "In that process of them trying to outperform each other, they will develop the best, most cost-effective systems."

The effects of the competition already are showing up. "Because Nielsen hadn't been challenged, there was no reason for them to be more competitive with their products," Poehner said and, indeed, TV executives say the older company has been much more responsive and accommodating this year, as its deal with ABC demonstrates.

In any event, Nielsen still has a big lead in the battle, with all three networks and a couple of hundred other clients, including virtually all major advertising agencies, syndicators and other ratings users, signed up. "It helps to have all the people under contract," Nielsen's Frerk said. "I don't know what AGB's total {client} figure is at this point. I can't believe it's much more than a couple dozen."

AGB officials concede they have a lot of convincing to do. Tops on their list is getting the other two major television networks into the fold. "We need to get recognized in the ball field," Poehner said. "They've got an opportunity now to evaluate two systems. ... If I was sitting in NBC's or ABC's shoes, I don't know how they could not buy us. We're talking billions of dollars here."

Still, many in the television industry wonder whether there is a need for two ratings services, particularly as the quality of the two systems improves to a point where the two sets of numbers are virtually indistinguishable.

"I think, in reality, we probably will eventually come back down to one ratings service, but I see the competitive thing going on for the next three years," Poltrack said.

"I don't believe the industry is going to make a revolutionary change from Nielsen to AGB," said William Rubens, vice president for research at NBC. "The model I've always had in my head is that there's only room for one ratings service. It's too confusing to have two.

"If the numbers turn out to be the same, there's no point in having two," he added. "And if they're different, there's no point in having two."