I'm pretty sure I have whooping cough. Three days ago during one of my coughing bouts I got a sharp pain in the back of my head, to the right of where the spine meets the skull. The pain lasts for about a few hours and slowly goes away over time. What could this be?
I have to ask the obvious question - Since you're pretty sure you have whooping cough, why are you sitting at the computer instead of seeing your doctor?
Seriously, there are any number of things the head pain could be, including cough induced headache, BUT the only person who can really tell you what it may be is your doctor who can review your medical history, discuss your symptoms with you, and examine you - in person. Nobody can diagnose via the Internet.
Please take care of yourself and see your doctor.