Find the number of arithmetic sequences $a_1,a_2,a_3$ of three nonzero integers such that the sum of the terms in the sequence is equal to the product of the terms in the sequence.

[i]Proposed by Sammy Charney[/i]
1. Let \( a_1 = x \), \( a_2 = x + d \), and \( a_3 = x + 2d \), where \( x, d \in \mathbb{Z} \). Given that the sum of the terms in the sequence is equal to the product of the terms in the sequence, we have:
   \[
   a_1 + a_2 + a_3 = a_1 a_2 a_3
   \]
   Substituting the values of \( a_1 \), \( a_2 \), and \( a_3 \), we get:
   \[
   x + (x + d) + (x + 2d) = x (x + d) (x + 2d)
   \]
   Simplifying the left-hand side:
   \[
   3x + 3d = x (x + d) (x + 2d)
   \]
   Since \( x + d \neq 0 \), we can divide both sides by \( x + d \):
   \[
   3 = x (x + 2d)
   \]
   Expanding and rearranging the equation:
   \[
   x^2 + 2dx - 3 = 0
   \]

2. Solving the quadratic equation \( x^2 + 2dx - 3 = 0 \) using the quadratic formula \( x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \), where \( a = 1 \), \( b = 2d \), and \( c = -3 \):
   \[
   x = \frac{-2d \pm \sqrt{(2d)^2 - 4 \cdot 1 \cdot (-3)}}{2 \cdot 1}
   \]
   Simplifying under the square root:
   \[
   x = \frac{-2d \pm \sqrt{4d^2 + 12}}{2}
   \]
   \[
   x = \frac{-2d \pm 2\sqrt{d^2 + 3}}{2}
   \]
   \[
   x = -d \pm \sqrt{d^2 + 3}
   \]

3. For \( x \) to be an integer, \( \sqrt{d^2 + 3} \) must be an integer. Let \( k = \sqrt{d^2 + 3} \), then:
   \[
   k^2 = d^2 + 3
   \]
   \[
   k^2 - d^2 = 3
   \]
   \[
   (k - d)(k + d) = 3
   \]
   The pairs \((k - d, k + d)\) that satisfy this equation are \((1, 3)\) and \((-1, -3)\). Solving these pairs:
   - For \( k - d = 1 \) and \( k + d = 3 \):
     \[
     k = 2, \quad d = 1
     \]
   - For \( k - d = -1 \) and \( k + d = -3 \):
     \[
     k = -2, \quad d = -1
     \]

4. Substituting \( d = 1 \) and \( d = -1 \) back into the equation for \( x \):
   - For \( d = 1 \):
     \[
     x = -1 \pm 2
     \]
     \[
     x = 1 \quad \text{or} \quad x = -3
     \]
   - For \( d = -1 \):
     \[
     x = 1 \pm 2
     \]
     \[
     x = 3 \quad \text{or} \quad x = -1
     \]

5. The pairs \((x, d)\) are \((1, 1)\), \((-3, 1)\), \((3, -1)\), and \((-1, -1)\). These yield the sequences:
   - For \((1, 1)\): \( 1, 2, 3 \)
   - For \((-3, 1)\): \( -3, -2, -1 \)
   - For \((3, -1)\): \( 3, 2, 1 \)
   - For \((-1, -1)\): \( -1, -2, -3 \)

Hence, there are a total of \( \boxed{4} \) arithmetic sequences of three nonzero integers such that the sum of the terms in the sequence is equal to the product of the terms in the sequence.