Continuous functions define a topology?
The first statement can be patched up using functions into the Sierpinski Space $\{0,1\}$ with topology $\{\varnothing , \{1\}, \{0,1\}\}$. Since a continuous function $X \to \{0,1\}$ can be identified with the open set $f^{-1}(1)$ we see the continuous functions into the Sierpinski space are the same thing as the open subsets of $X$.
Your first question is easily addressed. Yes, on the face of it, there are a proper class of such maps. However, we can restrict attention to topological spaces $X$ which have cardinality no greater than $S$, since we can leave off the part of a space not in the image of $f$. Up to homeomorphism, there are only set-many such $X$ (specifically, $2^{2^{\vert S\vert}}$-many at most). And for each specific space $X$, there are only set-many maps from $S$ to $X$.
Incidentally, there is still one remaining subtlety: actually picking out a set of "enough target spaces". This is potentially an issue, since each homeomorphism type contains a proper class of spaces! This can be handled - without even using choice! - by noting that every such homeomorphism type has a representative of rank (in the cumulative hierarchy sense) $\le\kappa+3$, where $\vert X\vert+\aleph_0\le \kappa$ (this is actually massive overkill but oh well); and the class of all topological spaces of a bounded rank is a set.
EDIT: Daron's answer gives a much slicker way to approach the problem. However, it's worth understanding the brute-force approach above, since that kind of reasoning is useful in other contexts as well where we have to deal with an apparent proper class of objects.
Re: your second question, yep, that's a pretty fundamental mistake. It should go the other way: you take the preimage of open sets in the target space. Specifically, the topology induced by $f$ is $$\{A\subseteq S: A=f^{-1}(U)\mbox{ for some $U$ open in the target space}\}.$$ The discrepancy, of course, is due to the fact that $f\circ f^{-1}(U)\subseteq U$, but these sets are not equal in general.