In general what you can say is that the rank of an $n\times n$ matrix is at most equal to the number of nonzero eigenvalues. The simplest counterexample is the matrix
$$
\begin{bmatrix}0 & 1 \\ 0 & 0\end{bmatrix}
$$
that has only the zero eigenvalue, but has rank $1$.
You surely know that, for an eigenvalue $\lambda$ of the matrix $A$, the following inequalities hold:
$$
1\le d\le m
$$
where $d$ is the dimension of the eigenspace $E_A(\lambda)=\{v\in\mathbb{C}^n:Av=\lambda v\}$, usually called the geometric multiplicity of $\lambda$, and $m$ is the algebraic multiplicity, that is, the maximum exponent $m$ such that $(\lambda-X)^m$ divides the characteristic polynomial $\det(A-XI_n)$ ($I_n$ is the $n\times n$ identity matrix).
In the particular case of $\lambda=0$, the eigenspace $E_A(0)$ is the null space of $A$, so this dimension is $n-k$, where $k$ is the rank of $A$. The number of nonzero eigenvalues (counted with their algebraic multiplicity) is $n-m$, where $m$ is the algebraic multiplicity of the zero eigenvalue. Since $n-k\le n-m$ by the above inequality, we get $m\le k$.
In the special case where $A$ has rank $1$ and every row is a nonzero multiple of the first row, there is at least a nonzero eigenvalue: indeed, $A=uu^H$ for some vector $u\ne0$ ($H$ denotes the hermitian transpose), so
$$
Au=uu^Hu=(u^Hu)u
$$
and the scalar $\mu=u^Hu$ is a nonzero eigenvalue. Thus, by the above considerations, the geometric multiplicity of the zero vector must be the same as the algebraic multiplicity, both equal to $n-1$.
The characteristic polynomial of a rank $1$ matrix is thus $(0-X)^{n-1}(\mu-X)$.
If you are dealing only with real matrices, just change references to $\mathbb{C}$ with $\mathbb{R}$ and the hermitian transpose with the transpose.