title: How to mock constructors and destructor with gmock
body: <p>I need to count how many times constructors(default/copy/move) and destructor have been called. I use gmock. How can i check it?</p>
  
  <p>EDIT: Thanks to Marko Popovic suggestion i will explain that i have for now. I have a class like this, and i want to mock it with gmock. How can i do this?</p>
  
  <pre><code>class A
  {
  public:
      static int m_calls_to_cons;
  
  public:
      A( )    { m_calls_to_cons++; }
  };
  
  int A::m_calls_to_cons;
  </code></pre>
  
  <p>I use this class to check behavior of my container.</p>