def __len__(self):
if not self._nodes_proxy_is_list:<EOL><INDENT>return <NUM_LIT:1><EOL><DEDENT>if not self._query_multiple:<EOL><INDENT>try:<EOL><INDENT>nodes = self._do_query(multiple=True, refresh=True)<EOL><DEDENT>except PocoNoSuchNodeException:<EOL><INDENT>nodes = []<EOL><DEDENT><DEDENT>else:<EOL><INDENT>nodes = self._nodes<EOL><DEDENT>return len(nodes)<EOL>
Return the number of selected UI elements.

Returns:
    :obj:`int`: returns 0 if none of the UI element matches the query expression otherwise returns the number
    of selected UI elements