Is there a clever way to count the number of different monomials, up to a permutation of the variables, of the polynomial:
$$g(z_1,\ldots,z_n)=\prod_{1 \le i_1 \lt \ldots \lt i_{n-2} \le n}{\left(1+z_{i_1}z_{i_2} \ldots z_{i_{n-3}}z_{i_{n-2}}\right)}$$
without expanding the expression?
The product has ${n \choose {n-2}} = {n \choose 2}$ factors.
For example if $n = 4$, we have:
$$g(z_1,z_2,z_3,z_4) = (1+z_1z_2)(1+z_1z_3)(1+z_1z_4)(1+z_2z_3)(1+z_2z_4)(1+z_3z_4) = z_2^3 z_3^3 z_4^3 z_1^3 + z_2^2 z_3^2 z_4^3 z_1^3 + z_2^2 z_3^3 z_4^2 z_1^3 + z_2^3 z_3^2 z_4^2 z_1^3 + z_2 z_3^2 z_4^2 z_1^3 + z_2^2 z_3 z_4^2 z_1^3 + z_2^2 z_3^2 z_4 z_1^3 + z_2 z_3 z_4 z_1^3 + z_2^2 z_3^3 z_4^3 z_1^2 + z_2^3 z_3^2 z_4^3 z_1^2 + z_2 z_3^2 z_4^3 z_1^2 + z_2^2 z_3 z_4^3 z_1^2 + z_2^2 z_3^2 z_1^2 + z_2^3 z_3^3 z_4^2 z_1^2 + z_2 z_3^3 z_4^2 z_1^2 + z_2^2 z_4^2 z_1^2 + 3 z_2^2 z_3^2 z_4^2 z_1^2 + z_3^2 z_4^2 z_1^2 + z_2^3 z_3 z_4^2 z_1^2 + 2 z_2 z_3 z_4^2 z_1^2 + z_2 z_3 z_1^2 + z_2^2 z_3^3 z_4 z_1^2 + z_2^3 z_3^2 z_4 z_1^2 + 2 z_2 z_3^2 z_4 z_1^2 + z_2 z_4 z_1^2 + 2 z_2^2 z_3 z_4 z_1^2 + z_3 z_4 z_1^2 + z_2^2 z_3^2 z_4^3 z_1 + z_2 z_3 z_4^3 z_1 + z_2 z_3^2 z_1 + z_2^2 z_3^3 z_4^2 z_1 + z_2^3 z_3^2 z_4^2 z_1 + 2 z_2 z_3^2 z_4^2 z_1 + z_2 z_4^2 z_1 + 2 z_2^2 z_3 z_4^2 z_1 + z_3 z_4^2 z_1 + z_2 z_1 + z_2^2 z_3 z_1 + z_3 z_1 + z_2 z_3^3 z_4 z_1 + z_2^2 z_4 z_1 + 2 z_2^2 z_3^2 z_4 z_1 + z_3^2 z_4 z_1 + z_2^3 z_3 z_4 z_1 + 3 z_2 z_3 z_4 z_1 + z_4 z_1 + z_2^2 z_3^2 z_4^2 + z_2 z_3 z_4^2 + z_2 z_3 + z_2 z_3^2 z_4 + z_2 z_4 + z_2^2 z_3 z_4 + z_3 z_4 + 1$$
and there are $11$ different monomials up to a permutation of variables. For example $z_1 z_2^2 z_3^2 z_4^3$ is equivalent to $z_2 z_3^2 z_4^2 z_1^3$.
SOME BACKGROUND:
The expression is the generating function for a system of linear equations built like in this answer. For the example $n = 4$ the system is:
$$\begin{cases} x_{12} + x_{13} + x_{23} = b_1 \\ x_{12} + x_{14} + x_{24} = b_2 \\ x_{13} + x_{14} + x_{34} = b_3 \\ x_{23} + x_{24} + x_{34} = b_4 \\ \end{cases} $$
The count is the number of degree-vectors for simple graphs with n vertices (see OEIS A004251). Each variable $x_{ij}$ is $1$ or $0$ whether the edge ${i, j}$ between vertices $i$ and $j$ is present or not in the graph. In the general case, the system has $n$ equations ($n={n \choose n-1}$ subsets of $n-1$ vertices), ${n \choose 2}$ variables and ${n-1 \choose 2}$ variables for each equation, and each variable appears $n-2$ times in the system. Sometime after the original post, I noticed that the result is the same with this polynomial:
$$g(z_1,\ldots,z_n)=\prod_{1 \le i \lt j \le n}{\left(1+z_{i}z_{j}\right)}$$
This one results from a linear system (dual of the above one) where the $x_{ij}$ edge variables are grouped for every vertex, for example $x_{12} + x_{13} + x_{14} = e-b_4$ in the above example, where $e$ is the total number of edges.
I noticed also that the number of all distinct monomials should be OEIS A005155.