For how many positive integers $p$ does there exist a triangle with sides of length $3p-1,$ $3p,$ and $p^2 + 1?$
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
For how many positive integers $p$ does there exist a triangle with sides of length $3p-1,$ $3p,$ and $p^2 + 1?$
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

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