Let us be systematic: the smallest sigma-algebra $\mathcal F$ containing $A$ and $B$ is generated by the partition $\{C_1,C_2,C_3,C_4\}$ with
$$
C_1=A\setminus B,\quad
C_2=B\setminus A,\quad
C_3=A\cap B,\quad
C_4=\Omega\setminus(A\cup B).
$$
Hence
$\mathcal F=\{C_I\mid I\subseteq\{1,2,3,4\}\}$, where, for every $I\subseteq\{1,2,3,4\}$, $C_I=\bigcup\limits_{i\in I}C_i$ (for example, $A=C_{\{1,3\}}$ and $B=C_{\{2,3\}}$). Hence, in the general case (that is, when none of the $C_i$ is empty), $\mathcal F$ has size $2^4=16$.
Likewise, the smallest sigma-algebra containing $n$ subsets has, in the general case, size $2^{2^n}$.