The whole idea of a chain idiom is based on access to the same original object in every chain call. This is usually achieved by returning a reference to the source object from each modification method. That's how your addwas supposed to be announced
Counter &add() {
++count; return *this;
}
, add .
add. , add ( ) , . . add, .