Thanks Vivek. On its own that indeed returns the number of children for each parent. How does that fit into my recursive query though?
╒════════════╤════════════╕
│"name" │"childCount"│
╞════════════╪════════════╡
│"Root" │3 │
├────────────┼────────────┤
│"Sub Assy 1"│2 │
├────────────┼────────────┤
│"Sub Assy 2"│1 │
├────────────┼────────────┤
│"Sub Assy 3"│1 │
├────────────┼────────────┤
│"Part 1" │1 │
├────────────┼────────────┤
│"Part 2" │1 │
└────────────┴────────────┘