
Drupal is a powerful content management system, but sometimes even simple requirements—like showing the total number of published articles—aren’t obvious to implement. This guide will walk you step-by-step through enabling a public article counter using only Drupal’s built-in Views module, so anyone can see how many articles you’ve published.
Why Would You Want This?
- Showcase the size of your content library.
- Provide transparency for readers or customers.
- Create engagement: “Join 150 other contributors!”
- API: Make the count accessible to outside tools.
Prerequisites
- A Drupal 8, 9, or 10 website.
- Admin (or Views editing) permissions.
If you want to know How to Download, Install, and Run Drupal then click on this. It has complete step by step guide.
Step 1: Create a View for Article Counting
- Go to
Manage
→Structure
→Views
.


2. Click Add view.

Configure the View:
- View name:
Article Counter
- Show:
Content
of typeArticle
- Create a page: ✔️ (checked)
- Page title:
Article Counter
- Path:
/article-count
(or any path you prefer) - Display format:
Unformatted list
(default is fine) - Click Save and edit.

Step 2: Add a Dummy Field (Hidden Field Requirement)
Drupal Views requires at least one field, even if you only want to show a summary. Here’s how:

In the View editor, under Fields, click Add.

Search for Nid or Title (e.g., Content: Nid
).
- Add the field.
- In the field’s settings, check “Exclude from display” (so it won’t show on the page).
- Click Apply.

Step 3: Add the Result Summary in the Header
- Find the Header section (right column in Views editor).
- Click Add beside Header.

- In the search box, type Result summary.
- Select Global: Result summary and Add and configure.

- In “Text to display”, enter:
Total Published Articles: @total
@total
will automatically display the actual count.
- Save the configuration.

Step 4: (Optional) Hide the Article List
If you want to show only the count and not a list of articles:
- In the Pager section (bottom center), set Items to display to
0
.- This will suppress the list and show just the summary.
Step 5: Save and Test
- Click Save at the top of the View editor.

- Visit your new page (e.g.,
/article-count
). - You should see something like:
Total Published Articles: 13

Step 6: Make Sure It’s Public
- The View is public as long as you haven’t restricted access.
- Ensure anonymous users can “View published content” in People → Permissions.
Conclusion
With these steps, you can quickly and easily add a public article counter to your Drupal website—no code, no extra modules, and it updates automatically as your content grows!
Show off your Drupal content today!