arduino circuit code problem

hello, I am trying to make a circuit with 4leds and a shift register so that when I push one push button the numbers count each time its pushed. the other button should reset. if reaches number 10 a sound should be emitted. Help with code ?

int inputPin = 2;
int inputPin2 = 4;
int val = 0;
int val2 = 0;
int data = 2;
int clock = 3;
int latch = 4;
int buttonPushCounter = 0;
int speakerPin = 9;
int length = 20;
char notes = "cc gg cc gg cc d b cc gg cc aa ";
int beats = { 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4 };
int tempo = 50;

void setup(){

pinMode(data, OUTPUT);
pinMode(clock, OUTPUT);
pinMode(latch, OUTPUT);
pinMode(inputPin, INPUT);
pinMode(inputPin2, INPUT);
Serial.begin(9600);

}

void loop(){
val = digitalRead(inputPin);
val2 = digitalRead(inputPin2);
if (val == HIGH && buttonPushCounter <16) {
buttonPushCounter ++;
for(int i = 0; i < 16 ; i++){
updateLEDs(i);
Serial.println(buttonPushCounter);
if(i == 10){
for( int j = 0; j < length; j++){
if (notes[j] == ’ ') {
delay(beats[j] * tempo);
} else {
playNote(notes[j], beats[j] * tempo);
}

delay(tempo/2);
}

}
}

}
if (val2 == HIGH){
buttonPushCounter = 0;
for(int p = 0; p < 16;){
updateLEDs2(p);
Serial.println(“RESET”);
}
}

if(buttonPushCounter == 16){
Serial.println(“You have reached the maximum number. Please restart and continue.”);
clock = 0;
}
if(buttonPushCounter == 10){
Serial.println(“You have reached the number with the sound! Listen Carefully”);
}
}

void updateLEDs(int value){
digitalWrite(latch, LOW);
shiftOut(data, clock, MSBFIRST, value);
digitalWrite(latch, HIGH);
}

void updateLEDs2(int value){
digitalWrite(latch, LOW);
shiftOut(data, clock, MSBFIRST, value);
digitalWrite(latch, HIGH);
}

void playTone( int tone, int duration) {
for (long j= 0; j< duration * 1000L; j+= tone *2) {
digitalWrite(speakerPin, HIGH);
delayMicroseconds(tone);
digitalWrite(speakerPin, LOW);
delayMicroseconds(tone);
}
}

void playNote(char note, int duration) {
char names = { ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘a’, ‘b’ };
int tones = { 1915, 1700, 1519, 1432, 1275, 1136, 1014};

for (int j = 0; j< 8; j++) {
if (names[j] == note) {
playTone(tones[j], duration);
}
}
}

The improperly posted code does something. You didn't describe that.

It's hard to help you without knowing what the problem is.