#include <iostream>
using namespace std;
class AnotherObjectType {};

class A {
public:
   A(){count = 0;};
	int count;
private:
    AnotherObjectType anotherObject;
};

 A f(){
    static A a;
    a.count++;
    //Other things...
    return a;
}

int main() {
	// your code goes here
	A a;
	for (int i = 0; i < 3; i++) {
		a = f();
		std::cout << "Count: " << a.count  << std::endl;
	}
	return 0;
}