Let \( \mathbf{a} \) and \( \mathbf{b} \) be two unit vectors such that the angle between them is \( \frac{\pi}{3} \). If \( \lambda \mathbf{a} + 2 \mathbf{b} \) and \( 3 \mathbf{a} - \lambda \mathbf{b} \) are perpendicular to each other, then the number of values of \( \lambda \) in \( [-1, 3] \) is: