Symbol Counting script

HI All

I have been trying to write a script to count symbols within a document. Has anyone done this as I cannot make it work. Just need it to copy the name and value (number of items) to the clip board so I can use it from there.

I found an old thread that counted shapes and this worked well, however need to have it count symbols instead, but would not work when I modified it.

Any help would be greatly appreciated and thank you in advance for any assistance.