in reply to Adding counters for text replacement

lt;p>text text text</p>

There may be a representation problem here. You may have meant the above string to represent  <p>text text text</p> rather than a bunch of entities. If so, this can be achieved by enclosing the HTML in code tags thusly:
   <code><p>text text text</p></code>
(<c> ... </c> tags can be used in place of <code> ... </code> tags). Please do not use <pre> tags! Please see Markup in the Monastery and Perl Monks Approved HTML tags, among others.