Let's first examine a few simplest cases and try to find some clues from these trials.
When $p=3$:
$$ \begin{array}{cccll} \hline p=3 & k & kp + 1 & a_i & divisors\\ \hline & 1 & 4 & 1 & (2)\\ & 2 & 7 & - & -\\ \hline & & a_1 + a_2= & 1 & (2) \\ \hline \end{array} $$When $p=5$:
$$ \begin{array}{cccll} \hline p=5 & k & kp + 1 & a_i & divisors\\ \hline & 1 & 6 & 2 & (2, 3)\\ & 2 & 11 & - & -\\ & 3 & 16 & 1 & (4) \\ & 4 & 21 & - & - \\ \hline & & a_1 +\cdots + a_4 & 3 & (2, 3, 4)\\ \hline \end{array} $$When $p=7$:
$$ \begin{array}{cccll} \hline p=7 & k & kp + 1 & a_i & divisors\\ \hline & 1 & 8 & 2 & (2, 4)\\ & 2 & 15 & 2 & (3, 5)\\ & 3 & 22 & - & - \\ & 4 & 29 & - & - \\ & 5 & 36 & 1 & (6) \\ & 6 & 43 & - & - \\ \hline & & a_1 +\cdots + a_6 & 5 & (2, 3, 4, 5, 6)\\ \hline \end{array} $$It appears that
- The answer is $\boxed{p-2}$,
- Every number in $2, 3, \cdots, p-1$ appears once and only once among the divisors, and
- The largest $kp+1$ (i.e. when $k=p-1$) does not have any qualified divisor.
Hence, a hint for solve this problem app
We note that there are totally $(p-2)$ divisors $2, 3, \cdots, p-1$, and there are totally $(p-2)$ numbers in the form of $(kp+1)$, excluding the largest one. Therefore, the observation listed above seems to indicate that the original problem is equivalent to showing that every number in $2$, $3$, $\cdots$, $p-1$ divides on and only one number in the following list:
$$p + 1, 2p+1, 3p +1, \cdots, (p-2)p + 1$$This claim can go further.
Claim: Fixed $m(1 < m < p),$ then $m$ contribute exactly once in one of $a_1,a_2,\dots,a_{m-1}.$
Proof. Consider the following $m-1$ numbers:\[p+1,2p+1,\dots,(m-1)p+1,\]since $\gcd(m,p)=1,$ and none of them equal to $1$ modulo $m,$ so the statement follows.
Hence the answer is $\boxed{p-2.}$