A cough should normally go away within 2 weeks time.
If your cough lasts longer than 2 weeks or you start coughing up phlegm that is thick and a yellowish-green color then you should see a doctor about the cough.
Also if you're experiencing shortness of breath or are wheezing a lot then you should make an appointment with your doctor for the cough.