code count tree