Number of functions $f:[4]\times[4]\rightarrow[4]$ Let $[k] = \{0,\dots,k-1\}$.
Consider the set $F(n,m)$ of functions $f:[n]\times[m]\rightarrow[m]$. 
The cardinality of $F(n,m)$ is $|F(n,m)| = m^{nm}$.
Consider the equivalence relation $f \simeq g$ between functions $f,g \in F(n,m)$ iff

there are permutations $\pi:[n]\rightarrow [n]$ and $\tau:[m]\rightarrow [m]$ such that
  $\tau(f(n,m)) = g(\pi(n),\tau(m))$

(see Harary/Palmer: Enumeration of Finite Automata).
Harary/Palmer give an explicit formula to count the number $a(n,m)$ of orbits (equivalence classes) of $\simeq$. And they show that $a(2,2) = 7$ (compared to $|F(2,2)|=2^4=16$). 
But I find it hard to get a number for $a(4,4)$ to be compared to $|F(4,4)| = 4^{16} \sim 4\cdot10^9 $, even given Harary/Palmer's formulas.

Is there a easy way to get this number?

 A: This is computationally feasible for F(4,4). I wouldn't attempt it for higher values though.
For F(4,4), represent the functions as 32-bit strings (really as 16-dibit strings but I'm thinking of computation more than algebra here).
The simple approach is to seive. Maintain a Bloom filter of all the functions you've visited (this is simply a $2^{32}$-long array of bits).
Take each $g$ that you've not yet visited, calculate its orbit under the action of S4 x S4, and sieve out all the functions you reach.
I haven't costed this but it's no worse than around $2^{41}$ permutations, so should run inside a day on a single core processor. I expect it to be rather better than that as the sieving gives a lot of cut-down.
Note also that the equivalence classes preserve the partition of [16] into 4 parts as you look across the image of $g$. You can use that to subdivide your search over partition classes, which will save on memory but not on time. This may be useful for tackling larger values where memory becomes an issue.
UPDATE: I've written it and am now running. Very quick and dirty code, so not guaranteed bug-free! Will be useful to compare results with Nitin.
