For a real number $\alpha$, let $[\alpha]$ denote the greatest integer less than or equal to $\alpha$. For a finite set $S$, let $|S|$ denote the number of elements in the set $S$.
Consider the functions $f:(-3,3) \rightarrow(-\infty, \infty)$ and $g:(-3,3) \rightarrow(-\infty, \infty)$ defined by
$$ f(x)=\left[x^3\right] \log _e\left(1+\sin ^2(\pi(x-[x]))\right) $$
and
$$ g(x)=x^3 \sin ^2\left(\pi \log _e(1+x-[x])\right) . $$
Let
$$ A=\{x \in(-3,3): f \text { is discontinuous at } x\} $$
and
$$ B=\{x \in(-3,3): g \text { is discontinuous at } x\} . $$
Then the value of $|A|+2|B|-|A \cap B|$ is $\_\_\_\_$ .