#include <iostream>
#include <string>

struct counter {
    size_t ints, doubles, strings, others;  
    
    counter(): ints(0), doubles(0), strings(0), others(0) {}
    
    counter & operator , (int) { ++ints; return *this; }
    counter & operator , (double) { ++doubles; return *this; }
    
    counter & operator , (char const *) { ++strings; return *this; }
    counter & operator , (std::string const &) { ++strings; return *this; }
    
    template <class T>
    counter & operator , (T const &) { ++others; return *this; }
    
    template <class T>
    counter & operator += (T const & v) { return this->operator , (v); }
    
    friend std::ostream & operator << (std::ostream & o, counter const & c)
    {
        return o << "counter{ ints:" << c.ints << ", doubles:" << c.doubles << ", strings:" << c.strings 
            << ", others:" << c.others << " }";
    }
};

int main()
{
    counter c;
    c += 10, 10., 200, "hello!", true, 5, 'x';
    std::cout << c << std::endl;
    
    return 0;
}