Count child of every node in hier table reading source just once

Hi guys, I'm trying to write a SQL statement to count how many child every node in a hierarchical table has. I want to perform this operation reading source table only one time. Following an example of source table: CREATE TABLE TEST_HIER ( ID NUMBER, PID NUMBER ); Insert into TEST_HIER (ID, PID) Values