How many permutations of $[n]$ are there satisfying $j=f(i)\iff i=f(j)$ for all $i,j\in [n]$?
I thought to count the number of permutations for which there's some $i,j\in [n]$ not satisfying the equivalence. So it's enough to count the permutations for which there are $i\neq j$ satisfying $f(i)=j,f(j)\neq i$.
So we start with $i$ and its image is determined for us. Then we go to $j$ and see it only has $n-2$ available places since it can't go to $j$ and it can't stay in place because $j$ will replace it. Then we're left with $n-2$ items and $n-2$ slots (every save the image of $i,j$) so I think the overall answer is $n! - (n-2)\cdot (n-2)!$
However I'm bad at combinatorics and am worried I have a mistake. The phrasing of the problem suggests inclusion-exclusion may be the correct approach but after trying it I didn't really get anywhere. I also thought the equivalence is saying $ \left\{ i,j \right\} $ is a "fixed block" so maybe something with fixed points and derangements...