How many positive roots can $\sum_{i}\frac{a_i}{x+b_i}$ have where $b_i$'s are all positive? What is the maximum number of positive roots $\sum_{i}^N\frac{a_i}{x+b_i}$ can have where $b_i$'s are all positive? (everything here is a real number. To provide context, I encountered this problem while doing theoretical neuroscience research where I am modeling a biological neuronal network as an artificial neural network.)
$x$ is our variable, $a_i$ is a constant (can be either positive or negative), and $b_i$ is always a positive constant. $a_i$ and $b_i$ have unique values at each $i$.
In other words, how many $x>0$ can satisfy $\sum_{i}^N\frac{a_i}{x+b_i}=0$?
If $a_i$ happens to be all positive or negative, I see that there are no roots at positive $x$. For example, the following shows $y=\frac{1}{x+1}+\frac{1}{x+2}+\frac{1}{x+3}$. You can see that there are poles at -1, -2, and -3 (which are $-b_i$'s), and the roots exist between the poles. Since $b_i$'s are all positive, the roots between the poles need to be all negative.

However, if $a_i$'s are a mix of positives and negatives (and $b_i$'s are still all positive), there can be root(s) outside the poles, making it possible to have a root when $x>0$. For example, $y=\frac{1}{x+1}+\frac{1}{x+2}-\frac{3}{x+3}$ is $0$ at $x>0$ as shown below:

If I zoom in to the positive $x$ part, we see the following:

It overshoots below 0, and then asymptotically approaches 0.
So far, no matter how large my $N$ is, a randomly generated function $\sum_{i}^N\frac{a_i}{x+b_i}$ seemed to have only one root at positive $x$, if there was any, when I sweeped through $x$ on my computer. However, I still believe the number of positive roots should be dependent on $N$. Any thoughts?

There can be $N-1$ positive roots.
For example: $y=\frac{(x-1)(x-2)}{(x+1)(x+2)(x+3)} $ has positive roots at $x=1$ and $x=2$, and it can be expressed as a sum of 2 hyperbolas where $b_i$'s are positive.
Generalizing this example, any rational function, with $N-1$ positive roots, of the form
$$y=\frac{\prod_j^{N-1}(x-c_j)}{\prod_i^N(x+b_i)} $$
$$\forall i,j:c_j>0,b_i>0$$
can be expressed in the form in my question
$$y=\sum_i^N\frac{a_i}{x+b_i} $$
$$\forall i:b_i>0$$
EDIT:
How to write a sum of hyperbolas that has roots at $c_j$'s and poles at $b_i$'s:
First, let's first write a function that has roots at $c_1$ and $c_2$ and poles at $b_1$ and $b_2$.
$$y=\frac{(x-c_1)(x-c_2)}{(x+b_1)(x+b_2)(x+b_3)}$$
and then, we show that this function can be written as a sum of three hyperbolas:
$$y=\frac{a_1}{x+b_1} + \frac{a_2}{x+b_2} + \frac{a_3}{x+b_3} $$
So the goal here is to find the values of $a_i$'s, given $c_j$'s and $b_i$'s.
First, the first equation expands to:
$$y=\frac{x^2-(c_1+c_2)x+c_1c_2}{(x+b_1)(x+b_2)(x+b_3)}$$
The second equation expands to:
$$y=\frac{a_1(x+b_2)(x+b_3)+a_2(x+b_1)(x+b_3)+a_3(x+b_1)(x+b_2)}{(x+b_1)(x+b_2)(x+b_3)}$$
$$=\frac{(a_1+a_2+a_3)x^2+(a_1(b_2+b_3)+a_2(b_1+b_3)+a_3(b_1+b_2))x+a_1b_2b_3+a_2b_1b_3+a_3b_1b_2}{(x+b_1)(x+b_2)(x+b_3)}$$
Since we want the first equation to be equivalent to the second equation, we need to satisfy the following equalities:
$$a_1+a_2+a_3 =1 $$
$$a_1(b_2+b_3)+a_2(b_1+b_3)+a_3(b_1+b_2) = -(c_1+c_2)$$
$$a_1b_2b_3+a_2b_1b_3+a_3b_1b_2 = c_1c_2 $$
In matrix form this is
$$
\left( \begin{array}{ccc}
1 & 1 & 1\\
b_2+b_3 & b_1+b_3 & b_1+b_2 \\
b_2b_3 & b_1b_3 & b_1b_2
\end{array} \right)
%
\left( \begin{array}{c}
a_1 \\
a_2 \\
a_3
\end{array} \right)
=
\left( \begin{array}{c}
1 \\
-(c_1+c_2) \\
c_1c_2
\end{array} \right)
$$
Say that this can be denoted $BA=C$, where $B$ and $C$ are known matrix and vector and $A$ is the vector we need to find. We can take the inverse of $B$ (assuming it is invertible) and multiply the inversion to $C$ to get $A$.
Therefore, as long as we have $b_i$'s that make $B$ to be invertible, we can have a hyperbola that has $N-1$ roots at $c_j$'s, all of which can be positive.
