<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nr_cases(self, snv_cases=None, sv_cases=None):
 """Return the number of cases in the database Args: snv_cases(bool):
 If only snv cases should be searched sv_cases(bool):
 If only snv cases should be searched Returns: cases (Iterable(Case)):
 A iterable with mongo cases """

        query = {}
        
        if snv_cases:
            query = {'vcf_path': {'$exists':True}}
        if sv_cases:
            query = {'vcf_sv_path': {'$exists':True}}
        if snv_cases and sv_cases:
            query = None

        return self.db.case.count_documents(query)