I found a reference where it is stated that: " _To compute the expected number of intersections, use the fact that expectation is additive. The expected number of intersections is just $\binom{N}{2}p$ where $p$ is the probability of an intersection_ ".
(To be honest, I can't figure out why $\binom{N}{2}p$ is the expected number. I ask you some suggestions in the comments. I tried with a Monte Carlo simulation and it seems to work fine.)
Then the probability $p=P(|l_i - l_j| < \delta)$ of having one intersection is computed as the portion of the area of the square $[0,1-\delta]\times[0,1-\delta]$ between the curves: $l_i - l_j > \delta$ and $l_i - l_j > -\delta$, and it is equal to: $$ P(|l_i - l_j| < \delta) = \frac{2\delta-3\delta^2}{(1-\delta)^2} $$