Are you counting sheep only to fall into a tortured slumber? Has the Sandman let you down? A new study led by Nils Sandman of the Centre for Cognitive Neuroscience at the University of Turku in Finland sheds new light on the risk factors for frequent nightmare.

The study included a sample of 13,922 people between the ages 25 and 74 and found that 3.9 percent of people suffer from frequent nightmares. The three risk factors associated with frequent nightmares are a negative attitude towards the self, insomnia and exhaustion, according to the study.

The study authors concluded: "Symptoms of depression and insomnia were the strongest predictors of frequent nightmares in this dataset. Additionally, a wide variety of factors related to psychological and physical well-being were associated with nightmare frequency with modest effect sizes. Hence, nightmare frequency appears to have a strong connection with sleep and mood problems, but is also associated with a variety of measures of psychological and physical well-being."

Of the people surveyed, 45 percent reported only having occasional nightmares with more than half of those questioned having reported no nightmares in the past 30 days.

Nightmares were most common among the women participating in the study (4.8 percent of women vs. 2.9 percent of men). Of those with severe depression, 28.4 percent had frequent nightmares. The symptom most linked to those who were depressed and had nightmares was "negative attitudes towards the self." Of the insomniacs, 17.1 percent had frequent nightmares.

This isn't to say that depression causes nightmares. "It might be possible that nightmares could function as early indicators of onset of depression and therefore have previously untapped diagnostic value," Sandman said, according to PsyBlog. "Also, because nightmares, insomnia and depression often appear together, would it be possible to treat all of these problems with an intervention directed solely toward nightmares?"