Push Button #number of pushes and select

  int State;
  int LastState;
  int pb1, pb2;
  Counter = digitalRead(6);
  if (State != LastState) {

You have no idea what is in the memory location that State is assigned to. You have no idea what is in the memory location that LastState is assigned to. It makes no sense to be comparing them.

     Counter++;

You have no idea what is in the memory location that Counter is assigned to. It makes no sense to be incrementing that value.

You probably want some of these variables to be global, so you DO have an idea what is assigned to them, and so that changes are persisted when PushButton1() ends.