Optimized depth_counter size in templight trace algorithm

from O(V) to O(log V)