TEIID-2800 fix for url encoding and user/password with TeiidDataSource
TEIID-2804 reducing the scope of the empty check and correcting to only
use count(*)