#include <iostream>
using namespace std;

int letters_counted_in_text(std::wstring const&text)
{
    int count = 0;
    wstring abc = L"abcdefghijklmnñopqrstuvwxyzáéíóúABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ";

    for (unsigned i = 0; i < text.length(); ++i)
        for (unsigned j = 0; j < abc.length(); ++j)
            if (text.at(i) == abc.at(j))
            {
                count++;
                j = abc.length();
            }
    return count;
}

int main()
{
    // your code goes here
    wstring test = L"Hola, cómo estás";
    cout << letters_counted_in_text(test);

    return 0;
}
