What am I doing wrong?

I'm am building a counter that uses a proximity sensor. My concept is that I will have the sketch take a base reading from the sensor and compare the current reading to the baseline. And when their is significant change it will increment a counter.
My problem is the counter just keeps incrementing even tho their isn't a change? Not sure what I'm doing wrong?

int sensorpin = 0;                 // analog pin used to connect the sharp sensor
int val = 0;                 // variable to store the values from sensor(initially zero)
int count = 0;          //variable to store count
int val2 =0;            //variable to store current sensor reading
void setup()
{
 Serial.begin(9600);       // starts the serial monitor
 val = analogRead(sensorpin);    // set a base sensorr reading
}

void loop()
{
 int val3 = val + 100;
 Serial.println(val);       //debugging
 Serial.println(val2);      //debugging
 Serial.println(val3);      //debugging
 delay(10000);              //debugging
 val2 = analogRead(sensorpin);       // reads the value of the sharp sensor
 if (val2 > val3 );
 {
   count = (count++);
   Serial.println(count);
 }

 delay(100);                    // wait for this much time before printing next value
}
if (val2 > val3 );

That's what you're doing wrong.
Lose the semicolon

int sensorpin = 0;                 // analog pin used to connect the sharp sensor
int val = 0;                 // variable to store the values from sensor(initially zero)
int count = 0;          //variable to store count
int val2 =0;            //variable to store current sensor reading
void setup()
{
 Serial.begin(9600);       // starts the serial monitor
 val = analogRead(sensorpin);    // set a base sensorr reading
}

void loop()
{
 int val3 = val + 100;
 
 Serial.println(val);       //debugging
 Serial.println(val2);      //debugging
 Serial.println(val3);      //debugging
 delay(10000);              //debugging
 val2 = analogRead(sensorpin);       // reads the value of the sharp sensor
 val = val2;  // you need to ad a value to val 
 if (val2 > val3 ) { // not use a ; on the end of if because you want it to use the piece bellow 
   count = (count++);
   Serial.println(count);
 }

 delay(100);                    // wait for this much time before printing next value
}

He's already got a brace.

What happened to the code tags, dexterbot?

Thanks for the quick replies!! One other question, I want to add some sort of error check. Like if their was a change detected it would wait a moment check again and if the change is still their increment the counter. That way something insignificant doesn't get counted

I want to add some sort of error check.

You have our permission. Go for it.

Did you have a question?

PaulS:

I want to add some sort of error check.

You have our permission. Go for it.

Did you have a question?

Sorry, what's in my head and what actually makes it to the keyboard aren't always the same.... I was asking for suggestions on how I would do it, but I have a couple ideas I'm going to try first. If I run into problems I will post a separate question

try to find the value of the sensor when not detecting ,,
then use this value to check ,, so if value do this ,, and if not do this ,,
use a second timer ,,
then when this timer counts 10 then ,, and when counter reaches 10 ,, you use this as a time ,,
then delay return ,,
or some sort ,,
and onley set counter back when signal is lost
no signal reset time counter ,,
til signal found and count starts ,,
think easy !! hard to write it down , :%
8)