Somewhere the function "user_count_characters" has been created already and its saying you are trying to make it again.
Do a search in your whole www folder for "user_count_characters".
You should put your functions in a "library", I haven't had a full search of znote but i did find this which has random functions in it.
Developement repository for the Znote AAC project. A website portal to represent and manage your Open Tibia server. - Znote/ZnoteAAC
github.com
Then you call your functions depending on what you need.