resultset_count check not working. Going another route