clean code
added: string.count('text')
fixed problem with string.htmlEncode()