count-bugfix - separated empty queries from joined queries