Rank of a diagonalisable matrix is equal to the number of nonzero eigenvalues counting multiplicity
if $A$ is diagonalisable then, $\exists P$ invertible matrix such that $P^{-1}AP=D$ where $D$ is diagonal matrix having eigenvalues of $A$ on its diagonal and each eigenvalue appears as many times as is its multiplicity.
Since, multiplying my invertible matrices causes no change in rank,
$r(A)=r(P^{-1}AP)= r(D)=$ number of nonzero diagonal entries = number of non zero eigenvalues counting multiplicity,
Hence proved. Is this correct?
Yes, your proof is correct. You have used the fact that the rank of similar matrices are equal and the rank of diagonal matrix is the nomber of non zero elements on the diagonal which are non zero eigenvalues.