(PDB-1017) Fix node tests hiding failures

There were several tests that were failing in v4 that were being hidden
by skipping over the assertions when the resulset was nil/empty. This
commit adds an explicit result count check and fixes the tests that were broken.
Merge pull request #1161 from senior/ticket/master/pdb-1017-node-tests-broken

(PDB-1017) Fix node tests hiding failures