Because we get one headache at a time. The "a" is an article.
However headache can be plural.
I get headaches when I think of all the work I have to do.
I get a headache when I think of all the work I have to do.
- For Teachers