My word counter block is ready for testing

An engraved archive of books and loose pages feeds into an open ledger, a mechanical counter, and a simple webpage diagram.

Last September I built a tiny block in Telex that did one thing: it counted every word I’d published. I shared the zip in a post, called it version 0.1.0, and moved on. That day, it said 23,004. Today it says 43,213.

This month, Automattic retired Telex. I’m grateful for it. Telex took me from an idea to a working block in an afternoon, and this block wouldn’t exist without it. If you built anything there, log in and download your projects. The retirement notice points people to WordPress Studio and Claude Code, which made me smile. I’ve used Studio for a long time, and all of my plugin and theme work happens there, so that’s where my counter went next.

First, I finally looked under the hood.

The prototype counted English just fine. Accented words split in two, though, and Japanese text barely counted at all. Once an hour, it read every post on the site to add up the total again. On my blog that’s no big deal. On a site with twenty years of writing, it’s a real problem.

I really like this little block. I can see it being a fun, niche block for longtime and prolific bloggers1, the people whose archives go back years and who’ve earned the right to show off a big number. So I wanted to build it properly and give it more detail, especially an easy way to add it to your theme without digging through templates yourself.

Site Word Counter 1.1 is on GitHub, and before it goes to WordPress.org, I’d love your help testing it.

What changed

It counts every language. Accented words, Japanese, Chinese, and Thai all count correctly. Shortcodes, HTML, and titles don’t count toward the total.

It stays fast on big sites. Each post gets counted once, when you save it. Your older posts are counted in the background right after you activate the plugin.

It can add itself to your theme. I borrowed this idea from Jetpack Newsletters, whose settings screen lets you pick where the Subscribe block shows up by clicking a picture of your page. Site Word Counter works the same way. Tick a box and your footer says “43,213 words published since 2021.” The year comes from your first post, and a Preview and edit link2 takes you straight into the Site Editor to reword it.

It comes with two patterns. “Words published since” is made for footers, and “Word count stat” puts a big number on your About page.

Your old counter still works. If you downloaded the Telex version from my blog, it keeps working, and it converts to the new block in one click.

How it got built

Earlier this year I wrote about leveling up from Telex to Claude Code, and I already gave the scroll indicator block the same treatment. This time the process looked like this: a written spec, ten small stories, and a check for every story before moving on.

The checks earned their keep. A handful of test posts caught bugs a demo never would. Words from two blocks ran together into “Bloggingwords.” A Japanese period counted as a word. My favorite: the test post that claimed to have exactly ten words had eleven.

I leaned on Pressship the whole way, not just at the end. It’s a command-line tool from Fatih Kadir Akın at Automattic, and most people will think of it as the thing that submits plugins to WordPress.org. I used it during development: pressship verify runs the readme validator and Plugin Check, so I ran it after every change. It caught a database query setting WordPress.org doesn’t allow, which I’d never have spotted on my own. And pressship pack built the zip on GitHub, with the folder name WordPress expects. When I’m ready for WordPress.org, it’ll handle the submission and the releases too.

I also tested it on Ipsum, the theme coming in WordPress 7.2. Good thing I did. Ipsum builds its templates from patterns, and my first version didn’t handle that at all. Big thanks to everyone building Ipsum in the open; being able to grab it from GitHub and try it on a real plugin is a gift.

Help me test it

Grab site-word-counter.zip from the latest release on the GitHub releases page, then upload it from Plugins › Add New › Upload Plugin. It needs WordPress 7.1 or later.

I’m especially curious about three things:

  • Big archives. How long does the first count take, and does the total look right?
  • Sites that aren’t in English. Does the number feel honest for your language?
  • Your theme. Does the footer line look at home somewhere other than Twenty Twenty-Five and Ipsum?

If something looks off, open an issue on GitHub or leave a comment here. Tell me your theme and roughly how many posts you have.

43,213

That’s my number, counted live by the block.

And tell me your number. How many words have you published?

  1. It is definitely for new bloggers too. I see this as a great way to self-track your progress and build authority with your audience. I’d install this on new sites right away. ↩︎
  2. One big evolution of the plugin is a real settings page. I also build Opa as a fun experiment for Radical Speed Month at Automattic. I think I’ll borrow my best idea from that project and bring it into its own plugin: Writing rhythm block for your WordPress dashboard. ↩︎

Leave a Reply

Your email address will not be published. Required fields are marked *

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.