How many functions map a number $x$ to $y$ such that $(x\mod y) = 0$? 
Given set $S=\{1,2,3,4,5,6\}$ how many functions map a number $x$ from the domain of $S$ to a number $y$ from the image of $S$ such that $y$ divides $x$ without remainder?

I'm not sure how to go about this. For example if $x=3$ then $y=1$ or $y=3$ while if $x=6$ then $y=6, 3, 2,1$. Also $1$ always needs to be mapped to $1$ because there aren't any other numbers in the image of $S$ which can divide $1$. For $2,3,5$ and there're $2$ possible elements in the image. For $4$ there're $3$ possible elements and for $6$ there're $4$. But I don't see how to combine the data. 

Every element in the domain must have an image, suppose element $i$ has $n_i$ options as an image.
Then the answer should be $\prod_{i=1}^6 n_i$.
You have computed $n_1=1$, $n_2=n_3=n_5=2$, $n_4=3$, $n_6=4$, just multiply them up.
