importance: 5
---
# Count descendants
There's a tree structured as nested `ul/li`.
Write the code that for each `
` shows:
1. What's the text inside it (without the subtree)
2. The number of nested `` -- all descendants, including the deeply nested ones.
[demo src="solution"]