Smoking paralyses the tiny hairs, or cilia, which line your windpipe and helps to clear dirt and mucus out of your lungs. When you stop smoking, the cilia start to work properly again and so you may experience more coughing and phlegm. If you can imagine all those hairs laying flat for so long and now that you've stopped they kind of say "right lads, let's get back to work again" and as they start to move it causes a dry tickle... This is a positive sign of recovery, showing that your body is getting rid of the tar and toxins which smoking has left in your lungs. These symptoms may last a while but can be soothed by drinking plenty of water or using sugar-free boiled sweets to help keep your throat moist.
However, if you're coughing persists and you become worried, please make an appointment to see your GP.