def count_files(filetype):
    ''' (str) -> int
    Returns the number of files given a specified file type.
    >>> count_files(".docx")
    11
    '''
    count_files = 0
    for files in listdir(folder):
        if files.endswith(filetype):
            count_files += 1
    return count_files
 (str) -> int
    Returns the number of files given a specified file type.
    >>> count_files(".docx")
    11
    
recipes/Python/578858_Convert_doc_docx_files/recipe-578858.py