Make all behave tests pass

Fixed various tests and add @wip
Moved query counts into their own feature and added @wip