“I wouldn’t want to overplay this,” Mr. Defty said, but as a chronicler of the monarchy, Mr. O’Donovan “is in a small way part of the U.K. constitution.”

As for Mr. O’Donovan himself, he speaks about his project — “my tables,” he calls them — as one of his life’s great endeavors.

“One started this thing because one was curious,” he said. “One has had a huge amount of enjoyment out of doing it, because one has met people one would never have met before. It has widened one’s life, in a way.”

The royal family attracts all manner of devotees, including some notable eccentrics.

Outside the maternity ward when any royal baby is born, you can count on running into the 83-year-old Tony Appleton, a former carpet salesman who shows up in the knee breeches and tricorner hat of a town crier; and 83-year-old Terry Hutt, a retired carpenter and joiner who wears a suit made of the Union Jack. Last spring, when the Duchess of Cambridge gave birth to her third child, Mr. Hutt slept on a bench outside the maternity ward for 15 days, having received contradictory reports about her due date.

Mr. O’Donovan is in his own scholarly category.

Born into a family of avid collectors, he hungered in his 40s to undertake a statistical project; he had been impressed by a man who used public records to tabulate the waxing and waning popularity of baby names, publishing his findings once a year in a letter to the editor of The Times of London. He found his fodder in the Court Circular, an account of the royals’ engagements that appears in The Times of London. He decided to clip each one, paste it in a ledger and run the numbers, releasing his first results at the end of 1979.

“It was just a fascination with what they actually did,” he said. “Some of them work extremely hard.”