add scripts that count the number of entries in the tress