---
title: "Display the count of child and descendant pages"
canonical: "https://support.appfire.com/space/RFC/1294270472/Display%20the%20count%20of%20child%20and%20descendant%20pages"
format: markdown
---
> Macro (aura-html)

## Scenario

Create a report showing the number of direct child pages and all descendant pages of a specified parent page.

## Result

![reporting-children-descendant-pages.png](media://2414bf32-6720-47ce-85b8-b88d6ef35d93)

## Recipe

| Apps | Reporting for Confluence Cloud |
| --- | --- |
| Level | Easy |
| Estimated time | 5 minutes |

## Steps

1. Create a new Confluence page, add a Reporting macro, and give the page a suitable title.
2. In the *Query* section on the left, set up the parent page query by typing the Confluence Query Language (CQL) syntax. For this example, use: `type=page AND title="Get Started"`  
Click **Search** to confirm the query matches your parent page.
3. In the *Add Expansions* section, select the following checkboxes to retrieve child and descendant pages:
  - **children **>** page**
  - **descendants **>** page**
4. Configure the first column of the report.
  1. In the *Add report Blocks *section, select **Basic** and click **Add block**.
  2. For **Block title***, *enter`Parent page`.
  3. For **Value**, select **content.title**.
5. Configure the second column of the report.
  1. In the *Add report Blocks *section, select **Basic** and click **Add block**.
  2. For **Block title***, *enter`Direct Children Count`
  3. For **Value**, select **content.children.page.size**.
6. Configure the third column of the report.
  1. In the *Add report Blocks *section, select **Basic** and click **Add block**.
  2. For **Block title***, *enter`All Descendants Count`.
  3. For **Value**, select **content.descendants.page.size**.

> ✅ Descendants include both direct and indirect children. So, if the *Get Started* page has 5 pages under it at any depth, the descendants count will display *5*.

7. Check the *Preview *section and **Save** your report.
8. **Publish** the page.