def count_consonants(text):
    """Count number of occurrences of consonants in a given string"""
    count = 0
    for i in text:
        if i.lower() in config.AVRO_CONSONANTS:
            count += 1
    return count
Count number of occurrences of consonants in a given string