Number of parameters in an RNN
The entities W , U and V are shared by all steps of the RNN and these are the only parameters in the model described in the figure. Hence number of parameters to be learnt while training = $dim(W)+ dim(V)+ dim(U)$. 

Based on data in the question this = $ n^{2}+ kn + nm$. 

where,


n - dimension of hidden layer
k - dimension of output layer
m - dimension of input layer