BOSTON (AP) _ When a robber shot a pregnant suburban woman to death and wounded her husband as they went home from a childbirth class, the horror of the crime riveted residents, lawmakers and activists.

But is Boston becoming more dangerous? The statistics and local officials say no.

''Boston is one of the safest cities in the country,'' said City Councilor David Scondras. ''The reality is that we are a class-segregated society that focuses on the middle and upper-middle class.''

Carol Stuart, 30, a lawyer who was seven months pregnant, was shot in the head by a man who held up the couple in their car Oct. 23 near a hospital in the Roxbury section.

The drama of rescuers' attempts to find the couple, tape-recorded by the emergency phone system, drew national attention. Stuart's husband called police on his car telephone and desperately tried to tell them where he was. During the lengthy exchange, Stuart watched his wife's life ebb away.

''She's still gurgling,'' he said. ''There's a busy street up ahead. Ahh, man. I can't see where I am.'' But later, as rescuers frantically tried to find them, Stuart said, ''Oh, man, it hurts and my wife has stopped gurgling, she's stopped breathing.''

Police were able to finally locate the couple from the sound of police sirens coming through the open cellular telephone after Stuart blacked out.

Mrs. Stuart died after the couple's son was delivered by Caesarean section. Her husband and son survived. Stuart was listed in stable condition Saturday at Boston City Hospital; Brigham and Women's Hospital would not disclose the baby's condition.

Police have no suspect in the shooting, officials said.

''With this case, there's kind of an awakening that says, 'Oh dear, it's real,'' said Scondras.

It is especially real in the inner city. In Boston as a whole, the homicide rate is actually down for the year. But in the Roxbury, Mattapan and Dorchester sections of the city, crime is up. There have been close to 200 shootings in two months there, up 33 percent. The shootings are a byproduct of an increase in gang activity, police say.

The Stuart killing brought the spotlight back to an area that last made major headlines when a child, Tiffany Moore, was killed last year by an errant shot from a gang member while she was sitting on a mailbox outside her mother's home.

Georgette Watson, a Roxbury community activist who started the Drop-a-Dime program to get people to report crimes, said, ''Boston as a whole is OK. The bulk of the crime is just here.''

Youngsters in those areas are especially fearful.

Jennifer Everette, an eighth-grader from Dorchester, wrote in a recent writing exercise after the Stuart shooting: ''Dear God... I wish my neighborhood was a beautiful place where I could walk the street without being scared of being caught in a crossfire.''

Black activists say it took the killing of a white suburbanite to draw some attention to the situation.

''I was surprised that it made the national news,'' said Wornie Reed, director of the William Monroe Trotter Institute, a think tank at the University of Massachusetts in Boston where black scholars examine black issues. ''I think if that had been a black woman who lived in the area, it wouldn't have brought that much attention.''

Statistics show the number of shootings and murders overall in Boston has remained almost the same this year. From January through Sept. 30, there were 782 shootings; last year during the same period there were 781. Homicides totaled 82 so far this year, compared with 84 murders by this time last year.

In all of 1988, Boston had 95 homicides out of a population of 620,000, which put it at 19th among major cities in the rate of homicide. By comparison, St. Louis, with a population of 425,000, had 140 homicides, according to FBI statistics. Newark, N.J., with a population of 319,000, had 115 homicides.

But police say more attention is being paid to crimes this year. ''Last year, the media didn't care about every shooting. Now they do,'' said Boston police spokeswoman Jill Reilly.

Nonetheless, some crimes get more attention than others.

James Moody, a 29-year-old black man shot to death in Boston just three hours after Carol Stuart, made the news only to illustrate the relative anonymity of ''routine'' deaths among minorities here.

Watson said that she and other Roxbury leaders conducted a survey to find out if people knew about both the Moody and Stuart murders. Almost everyone had detailed knowledge of the Stuart case but few knew anything about Moody, who was coming home from work at the time he was fatally shot in the head.