Copied to ch12
Nuke count_leaves. Useless anyhow.
Holy shit I hate updating headers.