count_by, count_all function now support with_deleted/only_deleted