Bernard Bertram tracks his yuletide joy on a spreadsheet.

The retired programmer has strung precisely 20,171 twinkling Christmas lights on his Burnsville home and lawn this season. He keeps printouts of his Christmas light stats and instructions on their exact placement in a red binder.

Bertram, 68, has a master's degree in math and a lifelong passion for outdoor holiday illumination. Christmastime is a happy marriage of holiday merriment and mathematical minutia.

He has decorated for the past three decades, and this year he's one of a handful of homeowners competing for the top prize in the 2012 Burnsville Winter Lighting Contest held by the Burnsville Convention & Visitors Bureau and the Dakota Electric Association.

"It's very relaxing for me. I find it very enjoyable," Bertram explains as he thumbs through his red binder at the kitchen table.

"When I go out and I see something is not working, it's a challenge to fix it."

From Thanksgiving to the epiphany each year, Bertram's two-story home and lawn at 15113 Stevens Av. are ablaze in a halo of Christmas lights and lit figures.

Bertram divides his display in two.

"I devote the house to Christian and the garage to secular," Bertram explains.

One of the biggest challenges for the math-minded programmer is the asymmetrical, unwieldy, maddening crab tree in the middle of the front yard. Its lighting configuration cannot be perfectly plotted, so with the help of his wife, he eyeballs it.

Patty Bertram said she sees no problem with her husband's holiday hobby.

"He really likes it, so it's just fine," she said. "There are a whole lot of worse things he could be doing with his time."

Bertram throws some extra effort into the Christian display. He built a 12-foot-tall lit cross and then poured a 200-pound permanent concrete base in the front yard to keep it from blowing down. He also built a large, illuminated star to hang on the front of the house with lights cascading down to the nativity scene.

The nativity scene is a work in progress. It took a few years to persuade his favorite Christmas store to add all the proper animal figures to its catalog, Bertram explains.

First, he lobbied for a donkey, and one was added to the catalog the next year.

"What's a nativity scene without a donkey?" Bertram insisted.

Next, he pushed for a camel for the three wise men. Then he decided the manger needed a cow. That was a bit of showboating, Bertram admits.

But it's all for the love of Christmas.

Bertram's love of lights started at age 14. He is the son of an electrician who grew up in snowy Barnesville, Minn. At age 14, he decorated his parents' home with lights and won third place in the local lighting contest.

Bertram was hooked.

He decorated his parents' house each year, spending his Christmas breaks in college stringing lights. He and his wife eventually settled in the Twin Cities. He laid low during the 1970s energy crisis but jumped back into the lighting game when they moved into their Burnsville home in 1977.

That first year, he outlined the house with 500 green lights. It was modest. It was tasteful.

It wasn't enough.

So he began adding. When he retired in August 2007, his first road trip was to Michigan to pick up a few more holiday items at Bronner's Christmas Wonderland, which bills itself as the world's largest Christmas store. They drove a van and came back with it full.

Bertram said he believes he's nearly reached the saturation point. He owns nearly everything Bronner's and Gertens have to offer.

He says some of his neighbors go overboard covering every square inch of lawn. Things got a little "tacky," he recalled. There are two things Bertram won't do in the front yard: plastic figures and blowups.

"It just didn't fit in," he said.

Bertram said he thinks about his lighting display all year but starts checking lights in September. He starts decorating around Halloween.

His two teenage grandsons help with the rooftop decorations. Their reward: a trip to Dairy Queen with grandpa.

"It's good training for them from a mathematical standpoint," Bertram said.

The wind can be a challenge, but he's added weights to most of his decorations. And then there are the rabbits. Bunnies develop a taste for the lights' insulation, which contains soybeans.

"I got hit again last night," Bertram said. He's found a solution: spray the lighting with a deer repellent. The smell will burn your nose for a day or two, but it works.

Shannon Prather is a Twin Cities freelance writer.