Say I have $\phi(\mathbf x)=\phi(x_1,x_2,x_3)$ and the composition $f(g(\mathbf x),x_4)$, where $\mathbf x\in\mathbb R^3$ and $x_4\in \mathbb R$.
If I'm correct the function composition $f(g(\mathbf x),x_4)$ consists of the following two functions $$ f:\mathbb R^2 \rightarrow \mathbb R\\ g:\mathbb R^3 \rightarrow \mathbb R $$
But the composition itself, $f(g(\mathbf x),x_4)$, is it a function of two or four variables?
The new function $h(x_1, x_2, x_3, x_4) = f(g(x_1, x_2, x_3), x_4)$ is a function of four variables.