This year, Zoo Vienna welcomed Fu Bao, or "Happy Leopard." Madrid celebrated the birth of Xing Bao, or "Star Treasure." And in Washington, D.C., the arrival of Bao Bao, or "Precious Treasure," had panda fans glued to panda cams.

In all, 2013 saw the birth of 49 panda cubs around the world, and 42 of them have survived. That's a record and an indication that captive breeding programs are working. There are now a total of 376 pandas living in captivity, most of them in China.

The steady gains in the panda population have brought not only more adorable photos, but also better science for researchers to draw on.

In July, when Zoo Atlanta's female panda Lun Lun surprised keepers with twins, the staff quickly implemented a swapping technique developed by researchers in China to keep both cubs alive.

The Chinese had observed that panda mothers would not care for two cubs at once. Given how tiny and vulnerable cubs are at birth, one would almost certainly die without care.

So in Atlanta, while Cub A was with mother Lun Lun, Cub B was kept warm in an incubator. For the first few weeks, the cubs were swapped every two hours, and later, every three to four hours.

Rebecca Snyder, Zoo Atlanta's curator of mammals, says these kinds of discoveries have really made a difference.

"I think the research has been a key reason that the captive population is doing so well now. Applying that to the wild population is not so easy," she says.

Snyder hopes visitors to the zoo will be inspired to do something for panda conservation.

"I hope that they see our cubs and then think about cubs that were born last fall in the wild, and want to do something to make sure those cubs also have a bright future," Snyder says.

The Chinese government's last survey of pandas puts the wild population at roughly 1,600 animals. A new survey is expected to be released next year.

Jonathan Ballou, population manager at the Smithsonian Conservation Biology Institute and the National Zoo, worries that the remaining panda habitat is fragmented, so pandas cannot roam from one forest to another.

"It's not 1,600 animals in some big huge forest," he explains. "It's 1,600 animals that are spread among a dozen or so forests, and some of them have very few animals. So there is going to be inbreeding and there are going to be catastrophes like landslides, which destroy the habitat."

Ballou's focus now is on preserving as much genetic diversity as possible in the captive population, with the aim of breeding pandas that, as a group, are hardier and less vulnerable to disease. The ultimate goal is to return that genetic diversity to the wild.

To determine each panda's genetic value, Ballou came up with something called a "mean kinship formula." Pandas with fewer relatives have a higher value than those with a lot of relatives. Each year, Ballou is part of a team that travels to China to make recommendations for matches based on these numbers.

The intricacies of panda matchmaking

There are some animals Ballou won't recommend for breeding, such as Pan Pan, a 28-year old male who has fathered 32 offspring and has a total of 119 descendants, including Bao Bao, the new cub in Washington, D.C. Ballou says Pan Pan's genes are overrepresented in the gene pool.

Ballou is most interested in cubs of "founders," wild-born pandas that are rescued, usually after wandering into villages hungry or sick.

"If I know the mom and dad are wild-caught animals and haven't bred before, that makes me the most excited, getting these genes into the population," he says.

In China, researchers have begun reintroducing captive pandas into the wild. Ballou believes that sometime soon they'll be talking about matching pairs of pandas to produce cubs specifically for this purpose.

Currently, the goal is to reach a total of 500 pandas in captivity, which Ballou thinks they'll hit within a few years. That's the number needed to preserve 90 percent of captive pandas' genetic diversity for 200 years.

"What happens now is going to be important in the long term for these guys," he says.