<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def object_properties_count(self, o):
 """ returns the number of user browsable properties of an object. """

        o_type = type(o)
        if isinstance(o, (dict, list, tuple, set)):
            return len(o)
        elif isinstance(o, (type(None), bool, float, 
                            str, int, 
                            bytes, types.ModuleType, 
                            types.MethodType, types.FunctionType)):
            return 0
        else:
            # Following lines are used to debug variables members browsing
            # and counting
            # if False and str(o_type) == "<class 'socket._socketobject'>":
            #     print "@378"
            #     print dir(o)
            #     print "hasattr(o, '__dict__')=%s" % hasattr(o,'__dict__')
            #     count = 0
            #     if hasattr(o, '__dict__'):
            #         for m_name, m_value in o.__dict__.iteritems():
            #             if m_name.startswith('__'):
            #                 print "    %s=>False" % (m_name,)
            #                 continue
            #             if type(m_value) in (types.ModuleType, types.MethodType, types.FunctionType,):
            #                 print "    %s=>False" % (m_name,)
            #                 continue
            #             print "    %s=>True" % (m_name,)
            #             count +=1
            #     print "    %s => %s = %s" % (o, count, dir(o),)
            # else:
            try:
                if hasattr(o, '__dict__'):
                    count = len([m_name for m_name, m_value in o.__dict__.items()
                                  if not m_name.startswith('__') 
                                    and not type(m_value) in (types.ModuleType, 
                                                              types.MethodType, 
                                                              types.FunctionType,) ])
                else:
                    count = 0
            except:
                # Thank you werkzeug __getattr__ overloading!
                count = 0
            return count