Hamiltonian for a two electron system
The electron-electron repulsion potential is an interaction potential, therefore it has one term per interaction. If you have two electrons, you will have only one term, representing the interaction between them. The number of potential terms will be, in your case:


Attraction between electron 1 and the nucleus (one interaction)
Attraction between electron 2 and the nucleus (one interaction)
Repulsion between electron 1 and electron 2 (one interaction)


In total, you will have three interactions and therefore only three potential terms (two for electron-nucleus and one for electron-electon interactions).

In general, an interaction potential that only depends on the distance of two particles can be written as
$$
U = \sum_{i&lt;j} u(|\vec{r}_i - \vec{r}_j|),
$$
where $u$ represents the interaction between only two particles. You see that for two electrons you will have only one term, since $i&lt;j$. For three electrons you will have three terms (interaction between 1 and 2, between 1 and 3 and between 2 and 3) and so on.

Maybe your confusion comes from the fact that, sometimes, this interaction potential is written as
$$
U = \frac{1}{2}\sum_{i\neq j} u(|\vec{r}_i - \vec{r}_j|)
$$
In this case, for two electrons, you will have two terms. However there is the factor $1/2$ which cancels out the double counting, since
$$u(|\vec{r}_i - \vec{r}_j|)=u(|\vec{r}_j - \vec{r}_i|).$$