fix #22 fix #21 fix #17 fix #15

every methode is tested
add mongoose count function
better code for factory mongoose functions