Fix bugs: entries under leaf are counted with cnt; when chtree is not null, add to queue. @Quadtree.