corrected load_db test and updated query_view to use count