If one deletes or stores buildings which provide happiness and rebuild them it will not count as “Gained Happiness”. The “Gained Happiness” has to be an addition to the present City Happiness, meaning if one has 1,000 Happiness and the Quest requests to gain 100 Happiness the City Happiness must reach 1,100 to complete the Quest.
Aw Jeez . . . can we put this to bed? This answer is [maybe] partially correct.
If you delete a residential building which will 'increase happiness' due to not having a residential unit, it is not recognized.
If you have 1,000 happiness in your city, you can add/delete trees all day long, and each tree will add to 'happiness gained'. At the end of the quest, you still have 1,000 happiness, yet you have 'gained' 100 happiness 18 points at a time by building each tree. Check the bar below the quest. It advances, does not retreat. IF however, the quest says 'Have 1100 happiness', then ya gotta keep the stuff on board for it to count. If you build a tree and get 18 happiness, you will get +18 on the bar. Delete the tree, and you get -18 on the bar. You're gonna need the full 1100 happiness.
Try it. Add tree - delete tree. Repeat. No need to delete/add happiness buildings. Clear out a road tile and have at it.
. . . . mk
**Obelisks are also fun, but then your city ends up looking like Schlongville.**