For how many positive integers does there exist a triangle with sides of length 3p - 1, 3p, and p^3 + 1?