better performance on counting

Removed unnecessary split from character count, switched paragraph and
word counts to use match rather than replace+split.