bash-script added for counting labels in a tree