Spatzimaus,
is it possible to SetNumRealBuilding for a building class that has NoLimit=false?
Sure. My mythology mod does exactly that; the NoLimit flag ONLY determines whether you can safely have more than one copy in a city.
There are a lot of things you can do with SetNumRealBuilding. In my mythology mod, for instance, I have 21 series of 4 buildings, where the Shrine of Water can "upgrade" to a Chuch of Water, which in turn upgrades to a Cathedral of Water, and so on. (The upgrade trigger is handled through a behind-the-scenes logic; you can't build any of these buildings manually.) I use SetNumRealBuilding at each of these upgrade steps, setting the number of instances to 0 for the old version and 1 for the new version.
Also, I've added four more NoLimit buildings: one adds +1 Food, one adds +1 Production, one adds +1 Gold, and one adds +1 Research, and copies of each are allocated to cities through the SetNumRealBuilding function. This allows me to dynamically change a city's yields in a way that the AI can comprehend, while still allowing for some fun effects. For instance, a god of Seasons will give each city extra Food during Summer and Fall, but not Spring or Winter, and the other three yields rotate similarly (Production is Spring and Summer, and so on.) On the other hand, a god of Balance will add a bonus to whichever yield is lowest in a city, and less to the yields that city produces more of. (A Cathedral of Balance adds +3 to your lowest yield, +2 to the next lowest, and +1 to the second-highest.) Since the yield is handled through an actual building in the city, the AI's thresholds aren't thrown off and it'll behave fairly normally.
what i want is to create buildings with happiness per population effect (broadcast tower, cinema, tv company)...
Since Happiness isn't a yield, that per-population thing can only be done through Lua, but yes, it'll work just fine with the method I described. The only difficulty is what I described earlier: it's a Set, not a Change, so you need to make sure you aren't counting something twice or overwriting a previous increment. The more things you add to the list of happiness-increasing stuff, the harder it becomes to manage.