Step 1: Express the equation in a simpler form.
We are given the equation:
\[
\sqrt{3} \cos 2\theta + 8 \cos \theta + 3\sqrt{3} = 0
\]
Using the double angle identity \( \cos 2\theta = 2 \cos^2 \theta - 1 \), substitute into the equation:
\[
\sqrt{3}(2 \cos^2 \theta - 1) + 8 \cos \theta + 3\sqrt{3} = 0
\]
Simplifying the equation, we get:
\[
2\sqrt{3} \cos^2 \theta - \sqrt{3} + 8 \cos \theta + 3\sqrt{3} = 0
\]
\[
2\sqrt{3} \cos^2 \theta + 8 \cos \theta + 2\sqrt{3} = 0
\]
Step 2: Solve the quadratic equation.
This is a quadratic equation in terms of \( \cos \theta \). Let \( x = \cos \theta \), the equation becomes:
\[
2\sqrt{3} x^2 + 8x + 2\sqrt{3} = 0
\]
Solve this quadratic equation using the quadratic formula:
\[
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\]
where \( a = 2\sqrt{3}, b = 8, \text{ and } c = 2\sqrt{3} \).
Substitute these values into the quadratic formula and calculate the values of \( x \).
Step 3: Find the number of solutions.
After solving for \( x \), calculate the corresponding values of \( \theta \) within the given interval \( \left[ -3\pi, 2\pi \right] \).
Step 4: Conclusion.
The total number of solutions for \( \theta \) is 5.
Final Answer:
\[
\boxed{5}
\]