>>574
DerivedBは論理的にDerivedAでもあるのだから、
DerivedBのインスタンスが生成されたときにDerivedAのカウントが増えるのは自然。
>>572が言っているのは継承を一度しか許さぬ云々ではなくそのことだと思う。
template <typename Derived>
struct countable {
protected:
    countable(bool b) : top(b) {if(b) ++count;}
    int get_count() {return count;}
    ~countable() {if(top) --count;}
private:
    bool top;
    static int count;
};
template <typename Derived>
int countable<Derived>::count;
class CBase {
    virtual int get_count() = 0;
};
class CDerivedA: public CBase, private countable<CDerivedA> {
    typedef countable<CDerivedA> countable_type;
public:
    CDerivedA(bool top = true) : countable_type(top) {}
    virtual int get_count() { return countable_type::get_count();}
};
class CDerivedB: public CDerivedA, private countable<CDerivedB> {
    typedef countable<CDerivedB> countable_type;
public:
    CDerivedB(bool top = true) : CDerivedA(false) , countable_type(top) {}
    virtual int get_count() { return countable_type::get_count(); }
};