I had a bout with a cold, the flu, then another cold and on to pneumonia a year and a half ago. I coughed so much I pulled muscles in my ribs. It was NOT a fun experience.
Trying to sleep with that was difficult to say the least. Ouch! I hope it heals quickly for you.