New to C myself, can anyone tell me why my functions aren't working

#include <cs50.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <ctype.h>

int count_letters(string text);
int letters, words, sentences;
float L, S, average_letters, average_sentences;

int main(void)
{
    string text = get_string("Text: ");

    //averages are calculated
    average_letters = ( (float) letters / 100) * words;
    average_sentences = ( (float) sentences / 100) * words;
    printf("%i\n", letters);
    printf("%i\n", sentences);
    //CC index is calculated
    int index = 0.0588 * average_letters - 0.296 * average_sentences - 15.8;

    //
    if (index > 16)
    {
        printf("Grade 16+\n");
    }

    if (index < 1)
    {
        printf("Below Grade 1\n");
    }

    if (index > 1 && index < 16)
    {
        printf("Grade: %i\n", index);
    }
}

int count_letters(string text)
{
    letters = 0;
    for (int i = 0, n = strlen(text); i < n; i++)
    {
        if (isalpha(text[i]))
        {
            letters++;
        }
    }
    return letters;
}

int count_words(string text)
{
    words = 1;
    for (int i = 0, n = strlen(text); i < n; i++)
    {
        if (isspace(text[i]))
        {
            words++;
        }
    }
    return words;
}

int count_sentences(string text)
{
    sentences = 0;
    for (int i = 0, n = strlen(text); i < n; i++)
    {
        if (text[i] == 33 || text[i] == 46 || text[i] == 63)
        {
            sentences++;
        }
    }
    return sentences;
}

I tried printing average_letters and letters, etc… they all give integer “0”

Don’t use global variables like this.

These values weren’t initialized, so these calculations are done with junk values.