Use regex to find all the tags.

The jQuery method inserts tags like tbody where they didn't actually
exist on the source html document.  It also misses tags like head,
body, and html.

Note that this method will not parse for valid tags.  If the html
contains <invalidhtmltag> then that invalid tag will be counted.