Let $f:\{1,2,3,4\} \to \{1,2,3,4\}$ be a function such that $f(i) \neq i$ for all $i$ (i.e., a derangement). Find the number of such functions.