from pathlib import Path


def get_latest_newsletter_number():
    # Find the number of the latest newsletter
    destination_path = Path(f"./content/newsletter")
    p = destination_path.glob("craft-letter-*.md")
    files = [x for x in p if x.is_file()]
    letter_number = len(files)
    return letter_number
