Their are baroreceptor sites in the carotid arteries that go up either side of your neck. These sites monitor your blood pressure. If they sense an increase in pressure, and this can be very localised, such as direct pressure on the site, used as carotid sinus massage by dr's to deliberately slow a very fast heart rate, the general blood vessels open up in an attempt to bring your blood pressure down. Decrease in blood flow to the brain means you feel faint. It's also seen in older people who strain when having a bowel movement; increased pressure in the neck against a closed epiglottis and they pass out. In your case this would perhaps make sense if it happens during a prolonged bout of coughing, but would be unusual during a single cough. Either way, as with all these things, a visit to the doctor to get your blood pressure checked is not a bad thing to do.