There are an abundance of word/character counting services out there but I've added this here because every SEO-optimised one seems to have a frustrating amount of trackers.
This uses a simple regex for word count, the string's length for character count, and Twitter's official library for tweet length.