Added count info to doctypes on the tree