qualified-id in declaration before '=' token / object counter variable
<p>I'm trying to count how many instances or the class <code>mole2</code> there are and store the number in a public static variable called mole_count.</p>

<p><strong><em>mole2.h</em></strong></p>

<pre><code>#ifndef mole2_h
#define mole2_h

#include "Arduino.h"
class mole2 {
  public:
    mole2(int input, int output);
    void popUp();
    void popdown();
    boolean moleBrainThinkPopUpNow();
    void setUpTimer(int up_timer);
    boolean didMoleGetHit();
    void setRecoveryTimer(int recovery_timer);
    void decrementRecoveryTimer();
    boolean dosePlayerMistMole();
    void moleReset();

    int input, output;
    static int mole_count;
    static int odds_of_poping;

  private:
    boolean _is_popped = false;

    int _up_timer = 0;
    int _recovery_timer = 0;

};
#endif
</code></pre>

<p><strong><em>mole2.cpp</em></strong></p>

<pre><code>#include "Arduino.h"
#include "mole2.h"

int mole2::odds_of_poping = 10;

mole2::mole2(int input, int output) {
  input = input;
  output = output;
  int mole2::mole_count = mole2::mole_count + 1;
  pinMode(input, INPUT);
  pinMode(output, OUTPUT);
}

void mole2::popUp() {
  _is_popped = true;
  digitalWrite(input, HIGH);
}

void mole2::popdown() {
  _is_popped = false;
  digitalWrite(input, LOW);
}


boolean mole2::moleBrainThinkPopUpNow() {
  if (_recovery_timer == 0 &amp;&amp;  _is_popped == false &amp;&amp; rand() % odds_of_poping == 1) {
  popUp();
    return true;
  }
  else {
    return false;
  }
}

void mole2::setUpTimer(int up_timer) {
  _up_timer = up_timer;
}

boolean mole2::didMoleGetHit() {
  if (_is_popped == true &amp;&amp; digitalRead(input) == HIGH) {
    popdown();
    _up_timer = 0;
    return true;
  }
  else {
    return false;
  }
}

void mole2::setRecoveryTimer(int recovery_timer) {
  _recovery_timer = recovery_timer;
}

void mole2::decrementRecoveryTimer() {
  if (_recovery_timer &gt; 0) {
    _recovery_timer--;
  }
}

boolean mole2::dosePlayerMistMole() {
  if (_is_popped == true &amp;&amp; _up_timer &gt; 0) {
    _up_timer--;
  }
  if (_is_popped == true &amp;&amp; _up_timer == 0) {
    popdown();
    return true;
  }
  else {
    return false;
  }
}

void mole2::moleReset() {
  popdown();
  _up_timer = 0;
  _recovery_timer = 0;
}
</code></pre>

<p><strong><em>FullError</em></strong></p>

<pre><code>Arduino: 1.6.12 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\Strings\Documents\Arduino\libraries\mole2\mole2.cpp: In constructor 'mole2::mole2(int, int)':

C:\Users\Strings\Documents\Arduino\libraries\mole2\mole2.cpp:9:25: error: qualified-id in declaration before '=' token

   int mole2::mole_count = mole2::mole_count + 1;

                         ^

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -&gt; Preferences.
</code></pre>