I, too, had an annoying dry cough after surgery. It was bad enough that often I could not speak, as the mere attempt to speak would trigger a coughing fit so bad I had to stop breathing for a few seconds and then get my breath. We never did ascertain the cause of the cough, but some time around week 6, it just disappeared on its own.
My docs suggested Robitussin DM, feeling that it would help but not inter-act with any other meds I was taking.
The others are right, too. Certain meds are known to cause coughing, so check with your docs.