Reformatting of conditionals, updated __doc_count to only count docs where _deleted is not true