added DB#count feature

Signed-off-by: Christian MICHON <christian.michon@gmail.com>