Lua Code:
local ZCountSave = {
["Count"] = {
["ClickedCount"] = 0,
}
}
Everytime your addon loads this table would be used if it were global and not local. And when your saved variable is loaded which is nil by default it would delete it.
When your main code runs your sv is not yet available. So you want to delay its use after an event that makes sure it is loaded. Typical is ADDON_LOADED (not sure if your implementation works ... as I dont see ZCount defined).
And in repsonse to the event you'd use a construct like
Lua Code:
local default = {
["Count"] = {
["ClickedCount"] = 0,
}
ZCountSave = ZCountSave or default
This would make sure your sv is used when available.
Edit:
A quick read should bring more light to this topic
http://wowpedia.org/AddOn_loading_process
http://wowpedia.org/Saving_variables..._game_sessions
A good choice to make sure your data is stored
http://www.wowace.com/addons/ace3/pages/api/ace-db-3-0/