Detecting how many button presses(single tap, double tap etc) with two simultaneous buttons noob here

So what I am trying to do is output a different number depending on the number of button presses e.g. for 1 button press it should output 1 and so forth. After that I only really want the outputs for 1 to 4 presses. I am using these inputs for a game.  Right now, it does work and counts up until 4 and then resets back to 0. The problem that I am having is it continues after 1 click to 2 clicks; what I want it to do is count 1 click when its clicked once, twice when its clicked twice etc. I am trying to use a debouncing code to distinguish between single tap, double tap, triple tap etc 
@VE7JRO kindly provided a great solution to this problem, albeit it was for one button. I am trying to adjust the code to accommodate 2 separate buttons (on separate pins), but it is giving me an error.

This is the code:

#include &lt;Bounce2.h&gt;

// Connect both buttons in series with one connection
// to GND and the other to a digital pin.
const int buttonPin1 = 2;
const int buttonPin2 = 3;

class Button
{
  private:

    int m_buttonPin1;
    int m_buttonPin2;
    int m_counter;
    unsigned long m_buttonPressTimeout;
    unsigned long m_previousMillis;

  public:

    Button(int button):
      m_buttonPin1(buttonPin1),
      m_buttonPin2(buttonPin2),
      m_counter(0),
      m_buttonPressTimeout(1500), // Button press timeout 500 ms.
      m_previousMillis(0){}



    void Update()
    {
      int valA = digitalRead(button1); // read button stateint 
      int  valB = digitalRead(button2); // read button state
       if (valA == LOW &amp;&amp;valB == LOW)
       { 
      if(m_counter &gt; 0 &amp;&amp; millis() - m_previousMillis &gt;= m_buttonPressTimeout)
      {
        Serial.print("Count from Update() just before it's re-set to 0 = ");
        Serial.println(GetCounter());
        m_counter = 0;
      }
    }

    void IncrementCounter(){
      m_counter++;
      if(m_counter &gt; 4){m_counter = 4;}
      if(m_counter == 1){
        m_previousMillis = millis();
      }
    }

    byte GetCounter(){
      return m_counter;
    }

};

Bounce button1Debouncer = Bounce();
Bounce button2Debouncer = Bounce();
Button MyButton(buttonPin1);
Button MyButton(buttonPin2);

void setup(){

  Serial.begin(9600);

  pinMode(buttonPin1, INPUT_PULLUP);
  button1Debouncer.attach(buttonPin);
  button1Debouncer.interval(5);
  pinMode(buttonPin2, INPUT_PULLUP);
  button2Debouncer.attach(buttonPin);
  button2Debouncer.interval(5);

}

void loop(){

  // Call the Update function as fast as possible.
  MyButton.Update();

  // Button pressed.
  if(button1Debouncer.update() &amp;&amp; button2Debouncer.update())
  {
    if(button1Debouncer.fell() &amp;&amp; button2Debouncer.fell()){
      MyButton.IncrementCounter();
      Serial.print("Count from Button Debouncer = ");
      Serial.println(MyButton.GetCounter());
    }
  }

}
}


The error is: "'buttonPin1' is not a type", I do not understand this error as it didn't give that error for when a single button was used.
You SHOULD pay attention to the following issues:

1. Floating input problem:

Symptom: the reading value from the input pin is not matched with the button's pressing state.

Cause: input pin is NOT used pull-up or pull-down resistor.

Solution: Use pull-up or pull-down resistor. See Arduino Button (with pull-up/pull-down)

2. Chattering phenomenon

It should be considered in only some application that needs to detect exactly number of the pressing.

Symptom: Button is pressed one, but Arduino code detects several times.

Cause: Due to mechanical and physical issues, the state of the button (or switch) is quickly toggled between LOW and HIGH several times

Solution: Debounce. See Arduino Button Debounce