oracle8.1.6 select count(*) as n_static_pages from static_pages where folder_id in ( select folder_id from sp_folders start with folder_id = :root_folder_id connect by parent_id = prior folder_id )