A few times over the course of my membership with Medium, I’ve wanted to know how many articles I’ve published to date. This would be a handy statistic, for various reasons — just to know how many articles you’ve published, right? (For example, in a bio, perhaps you’d want to write “I’ve published more than 500 articles on Medium.”)
Oddly, it’s not an easy thing to calculate, though. If you go into Stories (in the Medium menu that pops down under your profile pic — in the desktop version, anyway), it shows sort of a gross (as opposed to net) count:
The problem with these stats is that it counts comments as well as articles. So, looking at that graphic, I know I’ve published a maximum of 771 things (articles + comments), plus another 25 articles in draft form still. Ergo, my grand total is 796 things.
But, I still don’t know how many of those 796 things were comments and how many were actual articles. After looking around a bit more here and there, I simply couldn’t seem to find the actual article count anywhere in the Medium interface. So I had to think up some other way to go about this.
Trial #1: File Download
It occurred to me that one could probably accomplish this calculation by going to Settings → Account, and then clicking the “Download your information” button. If you do that, you’ll get an email with a download link for a ZIP file containing all of your writing. Be sure to grab that ZIP when it’s available, as they delete these ZIPs after 24 hours.
This isn’t a bad method because it’s actually good business practice to pull a download every so often, just for safe keeping. Ask any web developer (like me) or IT person; backups are your friend!
Anyway, once you download and expand that ZIP file, you’ll see the same statistic in the “posts” folder they send you. So, here’s a screen-grab of mine, with the Windows file explorer showing the same number (796) in the bottom left.
Sadly, looking at the file names, there doesn’t seem to be any way of separating posts from comments. So, as far as this method is concerned, I think we’re out of luck.
But looking for differences did remind me of a second way. So, let’s go back to the Stories listing page.
Method #2: The Stories Listing
Again, go back to where we started — the Your Stories page on Medium.
Here I happened to notice something that, while not perfect, does seem to help. You see, the articles that were published under the Medium Partner Program have a star next to them.
That’s (finally) a difference we can work with. Have a look:
For me, I happened to have put (*almost*) every article under the Medium Partner program. And, for this purpose, that’s very helpful because those all have stars next to them — which provides us with something to work with.
So, right away, I can tell you that, if you’re not using the Medium Partner program, then the method below will not help you, and you may as well just manually count on the screen. Hopefully you don’t have as many articles as I do, or it might take you quite some time — especially if you’re an active commenter here.
How To Do The Count
First, we need the whole page to show — all of your articles. So, step one is to hold the Page Down button on your keyboard down until you’ve loaded all of your stories. For me, that took about two full minutes (as I have, as we know, 796 things to load).
My first idea was to simply search for the star using the browser’s built-in Control+F search feature. After all, if I search for “Published,” I get a reasonably close number:
It shows 778 for me — more than my 771 — because I have some articles with the word “Published” in the title.
As for searching for the star? Well, unfortunately, that doesn’t work because that little star is an SVG graphic.
If I search for the SVG tag using the Chrome Inspector, I get a higher number (1275), as there are additional SVGs on the page:
(BTW, I thought I’d maybe copy/paste the page into Excel, and maybe that SVG would show up there, which I could work with. And… no. Don’t try this. It was a total mess. It might be doable this way, still, but I decided not to go down this road.)
My next idea was to save the page (the same page that showed ALL of my published items). Note that, for this type of page, clicking View Source isn’t a viable method to load the entirety the page contents. So, I just did a Save As of the already fully-loaded page,and then opened the page in a proper HTML editor.
The first thing I did was to strip out everything above the first story in the HTML (by searching for some text in my first headline to find the spot), and then I stripped out everything after the last entry (same method). That gave me a chunk of somewhat less bulky HTML to look at.
From there, I “simply” identified the various SVG elements, as there were only a few different kinds. The first kind were the little down arrows that show beneath each entry:
So, all I did was to isolate the SVG code for that down arrow, and do a simple search & replace (replacing those instances with nothing).
All of the other SVGs, as far as I could tell, were the stars shown above. So, I simply added a ###STAR### string before each SVG tag by doing a search and replace, searching for <svg and replacing it with ###STAR###<svg. Then I saved the HTML as a temp file, loaded it, and searched out ###STAR.
And after all of that, I found my answer: 498.
Again, this method will only count the number of articles that are also in the Medium partner program. So, for me, that is 498. I’m pretty sure that I have just ONE article that I keep as public (not in the partner program), so that makes my number 499. And, with this oddball piece, I can officially say that I’ve written 500 articles here.
If there’s a quicker way (which of course there is, and I’ve probably wasted a chunk of my morning on this), I’d be happy to know about it. But, it also at least shows that there’s usually a tech solution to things like this, if you’re willing and tenacious. :-)
✍🏻 Jim Dee maintains three blogs — Hawthorne Crow, Web Designer | Web Developer Magazine, and Wonderful Words, Defined — and contributes to various Medium pubs. Connect at JPDbooks.com, Amazon, FB, Twitter, Instagram, LinkedIn, Medium, or Jim [at] ArrayWebDevelopment.com. His latest screwball literary novel, CHROO, is a guaranteed good time.