Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Is there any "easy" way to count number of pages?


Is there any "easy" way to count number of pages?

I must esteem how many pages there are on our Intranet. Do anyone know any smart way how to calculate how many pages there are under a "root"?

Since it is on our Intranet I cannot use any "free ware" or anything out at www. I have to stick to basics or what's found in CMS.

On top of that I would be happy to know how many files from upload that are linked to. But I guess this is an impossible question or????

Sorry if I post this in wrong forum. But there doesn´t seem to be any forum that is more suitable than the other. I guess many of you have/had the same problem as I have.

And by the way - I´m not a system developer ;)


Sep 01, 2009 16:58

I think I found the answer myself - just when post this issue -
Reportcenter :)

Or is there any better way?

Sep 01, 2009 17:22


You can see total number of pages in the database in admin mode.

Sep 06, 2009 19:30

As Per mentioned, when you open Admin mode, before clicking to any other pages, you can see some information from the database. Please let us know if this is not the information you'e looking for.

Sep 07, 2009 11:24

Yes but I´m not trusted :( 

Working in an organization with 2000 editors and 40 infomasters an "ordinary" projektleader & infomaster has very limited access to admininstration stuff.

But the reportcenter gave the data I needed. So I´m happy for the moment Laughing
Well not exactely happy - far too many pages

Edited, Sep 07, 2009 11:36

7 years later ... I don't see anything after clicking Admin. The page is blank. Is there a new way to do this now days or am I missing something?

Jul 26, 2018 16:54

Do you use Find? If so you can go to the overview view, and see number of content items per content type.

Also worth checking out Nicola Ayan's Content Audit tool - very cool stuff 

Jul 27, 2018 4:19

11 years later ... I don't see anything after clicking Admin. The page is blank. :-)

May 28, 2021 15:05

Using EPiServer.DataAbstraction.IContentTypeRepository you can list out all the content types including root page.

- For solution here is the sample code:

int pageCounts = _contentTypeRepository?
                .Where(x => x.GetType().Name == "PageType")?
May 29, 2021 10:26

The database is your friend!

Count pages:

FROM tblContent
WHERE ContentType = 0

To count pages (all decendents) under a root, first get the path to your root (example with page id 8):

SELECT ContentPath 
FROM tblContent
WHERE pkId = 8

In this example the result is .1.

Append the root id and a dot (8.) + the wildcard character % and you are ready to go:

FROM tblContent
WHERE ContentPath LIKE '.1.8.%' AND ContentType = 0

Want easier access to the database? Have a look at this:

Edited, May 30, 2021 5:57

I see some excellent answers above however I am not sure we are getting enough context regarding that question:

  • Are we including unpublished pages ?
  • Are we including content tree nodes that are not pages ?
  • Are you using tools on that website to generate dynamic pages ? Partial router or different pages based on the query strings ?

It is possible to list the "pages" in EPiServer, but it is sometimes easier to check with SEO tools (like google console search) to list the "real" pages that are out there.

Please bear in mind that this solution is for public pages only. For extranet / portals, the solutions that could work are:

  • Count the pages in the database minus the "repository" nodes & page variations by query string.
  • Use a custom crawler to list the pages that are available in your extranet.
May 30, 2021 8:20

Thanks for this information! Very interesting solution! Thanks!

Oct 27, 2021 14:36
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.