Added functionality to KVDB to fetch ONE or COUNT from query