In general, a group homomorphism is determined entirely by the image of a set of generators. Given this, if the codomain is finite, then this puts a relatively easy to check upper bound on the total number of possible homomorphisms. For example, in your second example question, $\mathbb{Z}_p\oplus\mathbb{Z}_p$ is generated by the elements $(0,1)$ and $(1,0)$ and so any homomorphism is entirely determined by where these elements are sent (and they must be sent to elements of order dividing $p$). I don't think you quite finished typing the entire question for question 2 because you didn't mention a codomain for the set of homomorphisms.
For your first example, note that $S_n$ can be given presentation $$\langle \sigma_i\ldots,\sigma_{n-1}|\:\:\sigma_i^2=1,$$ $$\sigma_i\sigma_j=\sigma_j\sigma_i\:\:\:\mbox{ for }j\neq i\pm 1,$$ $$\sigma_i\sigma_{i+1}\sigma_i=\sigma_{i+1}\sigma_i\sigma_{i+1}\rangle$$
Suppose $h\colon S_n\rightarrow G$ is a homomorphism. Then $h$ is determined by the image of the generators. But note, $$h(\sigma_i\sigma_{i+1}\sigma_i)=h(\sigma_i)h(\sigma_{i+1})h(\sigma_i)$$
$$=h(\sigma_i)h(\sigma_{i})h(\sigma_{i+1})=h(\sigma_i\sigma_{i})h(\sigma_{i+1})=h(1)h(\sigma_{i+1})=h(\sigma_{i+1})$$
and similarly $h(\sigma_{i+1}\sigma_{i}\sigma_{i+1})=h(\sigma_i)$. But $\sigma_i\sigma_{i+1}\sigma_i=\sigma_{i+1}\sigma_i\sigma_{i+1}$ and so we have $h(\sigma_i)=h(\sigma_{i+1})$ for all $i$. By induction the image of all generators is equal and so $h$ is determined by the image of any single generator. Given that $h(\sigma_i)$ has to be an element of order dividing 2, this significantly reduces the possible homomorphisms.
For any group $G$, you have a bijection between $G$ and the set $Hom(\mathbb{Z},G)$ of group homomorphisms $\mathbb{Z}\to G$.
The bijection is as follows: for $x\in G$, set $h_x:\mathbb{Z}\to $G$, \ m\mapsto x^m$.
Then the desired bijection is $G\to Hom(\mathbb{Z},G), \ x\mapsto h_x.$
First of all, you have to check that $h_x$ is indeed a group homomorphism (easy).
For the injectivity part: if $x,y\in G$ are such that $h_x=h_y$, then $h_x(1)=h_y(1)$, that is $x=y$?
For the surjectivity part: the main idea is that any element of $\mathbb{Z}$ is the sum of several copies of $1$ (or $-1$). Thus, in order to define a homomorphism $\varphi: \mathbb{Z}\to G$, it is enough to know $\varphi(1)$.
More precisely, if $\varphi$ is such a morphism, then, for all $m\geq 0$, we have $\varphi(m)=\varphi(1+\cdots+1)=\varphi(1)^m$.
If $m<0$, then $\varphi(m)=\varphi(-(-m))=\varphi(-m)^{-1}$ (a morphism repects inverses), so $\varphi(m)=(\varphi(1)^{-m})^{-1}=\varphi(1)^m$.
Finally, $\varphi=h_x$ with $x=\varphi(1)$.
In particular, if $G=\mathbb{Z}_n$, you get $n$ such morphisms.
Concerning your second question, you have only the trivial group/ring morphism. Any element of $\mathbb{Z}_n$ has finite order. But a morphism sends an element of finite order to an element of finite order. Since the only element of $\mathbb{Q}$ of finite order is $0$....
Edit Some answers were given while I was typing. Feel free to delete this post if it seems useless.
Best Answer
Let $\phi:G\rightarrow H$ be a mapping from groups $G$ to $H$ .If $\phi$ satisfies $\phi(ab)=\phi(a)\phi(b)$ for any $a,b\in G$ then $\phi $ is said to be a group homomorphism from $G$ to $H$ and $\phi(G)\subseteq H$ is said to be a homomorphic image of $\phi$.Moreover if $\phi$ is surjective then $\phi(G)=H$ and $H$ is a homomorphic image of $G$ under $\phi$