Yes. For any square matrix, the rank is equal to the dimension of the space minus the dimension of the zero eigenspace (that is, the "geometric multiplicity" of zero). The rank is also the number of non-zero singular values (this one works for non-square matrices).
For a symmetric positive semi-definite matrix (which is symmetric and therefore diagonalizable), the rank is simply the total multiplicity of non-zero eigenvalues (or the dimension of the space minus the multiplicity of the zero eigenvalues).
In a sense, this follows from the fact that (orthogonally/unitarily) diagonalizing a positive semidefinite matrix gives you a singular value decomposition.