def count(s):
    count = 0
    leng = s.length
    arr = [],

    for (i=0; i<leng; i++)
    {
        if s.charAt(i) == s.charAt(i+1))
            arr[0]
            s.charAt(i).push()
            count ++;
            }
        else.
            arr[i]=s.charAt(i).push()
            count ++;

    dictionary = {arr[i]: count]