I have learned this criterion for irreducibility of polynomials:
Let $R$ be an integral domain, let $I$ be a proper ideal of $R$, and let $p(x)$ be a non-constant monic polynomial in $R[x]$. If the image of $p(x)$ is irreducible in $(R/ I)[x]$ under the natural homomorphism, then $p(x)$ is irreducible in $R[x]$.
Now the polynomial $xy+x+y+1 = (x+1)(y+1)$ is reducible in $\mathbb{Z}[x, y] = (\mathbb{Z}[y])[x]$. Take $R = \mathbb{Z}[y]$ and $I = (y)$. Then the image of $xy+x+y+1$ in $(\mathbb{Z}[y]/(y))[x]$ is $x+1$, which is irreducible because $\mathbb{Z}[y]/(y) \cong \mathbb{Z}$ and $x+1$ is irreducible in $\mathbb{Z}[x]$. Why does this criterion seem to not work in this situation?
Edit: Proof of the criterion
We prove the contrapositive. Suppose $p(x)$ is reducible, $p(x) = a(x)b(x)$. Since $p(x)$ is monic, $a(x)$ and $b(x)$ are non-constant and monic. Thus when you reduce the coefficients $\pmod I$ you get a factorization in $(R/I)[x]$.
$xy + x + y + 1 \in (\Bbb Z[y])[x]$ is not monic, for its leading coefficient is $y+1$.