I don't know officially, but I can imaging that, if not, the reason might be that the coins were initially already gained before the structures were built and only re-gained once the structure was sold. Not sure I agree with that, but...Quest 76: gain xxxxx coins. Does selling a building not count towards the collection of coins. I have just sold 2 buildings but the coins gained were not added to the total needed for the quest.
You could always open a help desk ticket to get an official response.