Server side: added result set count. fixed nullpointer
Merge branch 'dev' into dev-test