Thank you for your question and the careful studying of the matters even though that algorithm is not an important one as explained in the slides and the video. So, why is the depth O(log(N))? When you study the bodies of the loops, you see in the first two loop an assignment whose right hand side contains a sum(j=0..N.1) over some values which are 0 or 1. To compute those sums you need O(log(N)) time as another algorithm (about array sums) explains.
To clarify, have a look at the first loop
for(i=0..N−1)
ls[i] = sum(j=0..N−1) (a[j]<a[i]?1:0);
You can rewrite this code as follows:
for(i=0..N−1) {
s = 0;
for(j=0..N-1) {
next(s) = s + (a[j]<a[i]?1:0);
pause;
}
ls[i] = s;
}
However, the depth would now be even O(N): Note that we can run the N inner loops in parallel, but since they are sequential, each one requires O(N) depth which is then also the case for the entire statement.
We can improve this by arranging the inner loop's operations in a binary tree as shown in the chapter on array sums. If you would do that, the sums would be computed in O(log(N)) depth and O(N) work, and that leads to the statements on the slide that you were wondering about.
It was not explained in that detail since the algorithm is NOT a comparison-based one that can therefore have less work than O(N log(N)). These are the algorithms we do not want to study in the chapter for the reasons mentioned.