We would have the joint distribution:
$$
P\left(X_1, X_2, X_3, X_4, Y\right)
$$
where $X_1, X_2, X_3, X_4$ are the attributes and $Y$ is the class label. The total number of entries in this table would be:
$$
3^4 \times 2=162 \text { entries }
$$
Since probabilities must sum to 1 , the number of independent parameters is:
$$
3^4 \times 2-1=161 \text { independent parameters. }
$$