I have these C++ classes:
class Base { protected: static int method() { static int x = 0; return x++; } }; class A : public Base
There will only be one, shared by all three classes. If you want separate instances, you will have to create separate functions in the derived classes.