if condition fail

Try this:

int count = 0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  if ((count < 3) && (++count == 3)) {
    Serial.println(count);
  }
}