Illvoi Operative’s ability will count any spells you’ve cast this turn, which may include Illvoi Operative itself. It doesn’t matter if the other spells resolved, didn’t resolve, were countered, or are still on the stack. If Illvoi Operative was the first spell you cast this turn, the next spell you cast this turn is your second spell. Similarly, if Illvoi Operative was the second spell you cast this turn, its ability won’t trigger and it won’t get a +1/+1 counter.