from axipy import data_manager, TypeSqlDialect

tab_sel = data_manager.selection
sql='Select Count(*) as count  from '+tab_sel.name+' Where Str$(obj)="Region" or Str$(obj)="Collection" group by  Str$(obj)'
tab_is_regions=data_manager.query_hidden(sql,TypeSqlDialect.sqlite)
count_obj=tab_is_regions.count()
tab_is_regions.close()
jkl=0