Made the no of elements in database a public data member.
Accessible by <myDBadapter object>.N

getQno now returns null if unsuccessful. So check for it before
unpacking it.

Signed-off-by: bazookan <aby.vinod@gmail.com>
Made the check for null everywhere

Signed-off-by: bazookan <aby.vinod@gmail.com>