Multi-format word counter
One suggestion is to simplify your top-level function by taking
advantage of a library and using a data structure to eliminate conditional logic.
import pathlib

def wordcounter(file_path):
    # Let a built-in library solve this problem.
    extension = pathlib.Path(file_path).suffix

    # Hold the counter functions in a data structure.
    # You'll need to create a couple of these.
    counters = {
        'xlsx': excel_counter,
        'docx': word_counter,
        'txt': txt_counter,
        'pdf': pdf_counter,
    }

    # Then just do what you want directly rather than checking conditions.
    return counters[extension](file_path)

Another observation is that your counter functions are duplicating the word
counting logic. Such duplication is often a signal that there are refactoring
possibilities: more specifically, the thing being duplicated might belong in
its own function. If we do that, you'll need to convert your current counter
functions (which take a path and return an integer) into reader functions (take a path
and yield chunks of text). Such a refactor is illustrated for excel_reader.
And those changes will imply a few simple adjustments in wordcounter.
def count_words(reader, file_path):
    n = 0
    for text in reader(file_path):
        n += len(text.split())
    return n

def excel_reader(file_path):
    wb = openpyxl.load_workbook(filename)
    for sheet in wb:
        for row in sheet:
            for cell in row:
                # Your current logic.
                text = str(cell.value)
                if text != &quot;None&quot;:
                    yield text

                # I've never used openpxl, but a quick internet
                # search suggests that this is more robust conditional
                # check to filter out empty cells.
                if cell.value is not None:
                    yield str(cell.value)