Suppose $(X,\tau)$ and $(Y,\sigma)$ are topological spaces. Let $F(X,Y)$ be the set of continuous functions $X\rightarrow Y$. I want to compute the cardinality of $F(X,Y)$. It depends not only on cardinalities $|X|$ and $|Y|$ but on the topologies as well: just imagine what happens if $X$ or $Y$ is discrete.

**Question: is it possible to write some "topological invariants" $|\tau|$ and $|\sigma|$ that yield the following explicit formula:**
$$|F(X,Y)| = \Theta (|X|,|Y|,|\tau|,|\sigma|)$$

I am sorry for being sloppy: I really need to clarify what a formula is. Ideally, $|\tau|$ would be a collection of cardinals and the formula will be given in the cardinal arithmetic. However, I would be glad to have any other method of computing the cardinality. Thus, "the formula" may be something more general.