from typing import Annotated
from pydantic import Field
def count_letters_impl(
word: Annotated[str, Field(description="The word to count letters in")],
letter: Annotated[str, Field(description="The letter to count")],
) -> int:
"""Count the number of times a letter appears in a word."""
return word.lower().count(letter.lower())