checker for counting nodes by type