What you describe happened to me when I was playing with my son one day. He weighed 18 pounds and I was lifting him up with my arms while I was laying on the floor. His foot came down and all of a sudden his toe went in between my ribs along with some of his 18 pounds.
It hurt but not too bad. After a few weeks, like you, I developed a cough. And one day after a particularly bad coughing fit, I heard and felt something pop. It hurt so much that I ended up driving to the critical care clinic from work and asking for an xray because I thought I must have broken a rib. It turned out that there is cartilege between the ribs, and the cartilege was pulled away from the rib and that's what hurt.
They wrapped my ribs and boy did that feel better! Cough meds helped too, of course! But the biggest thing is that I was not allowed to left anything, including my son, for a month. That was hard, but totally necessary.
So, wrap your ribs. Don't lift anything and take care of your cough. Hopefully this will take care of it.
Dawn