Understand the given function.
$f(X,Y,Z) = f(X’,Y’,Z’)$ means:
$f(0,0,0) = f(1,1,1)$ ;
$f(0,0,1) = f(1,1,0)$ ;
$f(0,1,0) = f(1,0,1)$ ;
$f(0,1,1) = f(1,0,0)$;
So, number of such functions over $3$ variables is $2^4 = 16.$
For $n$ variables:
$f(a_1,a_2, \dots a_n) = f(a_1’,a_2’, \dots a_n’)$ means:
For any row $0 \leq m \leq 2^n -1$, $f(m) = f(2^n – 1 – m).$
So, the number of boolean functions for which $f(a_1,a_2, \dots a_n) = f(a_1’,a_2’, \dots a_n’)$, is $2^{(2^{n-1})}.$