Finding the number of capital letters in a word grouped by letter Please see the code options below:

Client App - this is the same for both options

LetterCounter lc = new LetterCounter("HeLLo");


Option 1

class LetterCounter
    {
        string _Word;
        List&lt;LetterQuantities&gt; letterQuantities;

        //Other functions will be here.

        public LetterCounter(string Word)
        {
            _Word = Word;
            LetterQuantities lq = new LetterQuantities();
            letterQuantities = lq.GetCapialLetterQuantities(Word);
        }
    }

    class LetterQuantities
    {
        int _Quantity;
        char _Letter;

        public LetterQuantities()
        {
        }

        public LetterQuantities(int Quantity, char Letter)
        {
            _Quantity = Quantity;
            _Letter = Letter;
        }

        public List&lt;LetterQuantities&gt; GetCapialLetterQuantities(string Word)
        {
            List&lt;LetterQuantities&gt; letterQuantitiesList = new List&lt;LetterQuantities&gt;();
            for (char c = 'A'; c &lt;= 'Z'; c++)
            {
                int count = Word.Split(c).Length - 1;
                if (count &gt; 0)
                {
                    LetterQuantities lq = new LetterQuantities(count, c);
                    letterQuantitiesList.Add(lq);
                }
            }
            return letterQuantitiesList;
        }
    }


Option 2

class LetterCounter
    {
        string _Word;
        List&lt;KeyValuePair&lt;char, int&gt;&gt; LetterQuantities = new List&lt;KeyValuePair&lt;char, int&gt;&gt;();

        //Other functions will be here.

        public LetterCounter(string Word)
        {
            _Word = Word;
            GetCapialLetterQuantities();
        }

        public void GetCapialLetterQuantities()
        {
            for (char c = 'A'; c &lt;= 'Z'; c++)
            {
                int count = _Word.Split(c).Length - 1;
                if (count &gt; 0)
                {
                    LetterQuantities.Add(new KeyValuePair&lt;char,int&gt;(c,count));
                }
            }
        }
    }


The concerns I have are:

1) Option 1: LetterQuantities returns a list of itself.  Not sure this is ideal.  However, it is how a Tree data structure works.
2) Option 2: This is simpler.  However, I am not sure whether 'Letter' is a valid key. 
3) I am not sure whether the object(s) should be Singletons as they are value objects rather than entity objects.

I believe I should use option 1 from a TDD point of view.
The answer is that I wouldn't use either of those approaches. Counting the number of occurrences on a string isn't complex enough that requires a class of it's own. An extension method however would be a reasonable way to do it, as well as using the LINQ to get the desired result:

public static IDictionary&lt;char, int&gt; GetOcurrences(this string value){
    return value.GroupBy(c =&gt; c)
        .ToDictionary(c =&gt; c.Key, c =&gt; c.Count());
}


Or to count only letters

public static IDictionary&lt;char, int&gt; GetOcurrences(this string value){
    return value
        .Where(char.IsLetter)
        .GroupBy(c =&gt; c)
        .ToDictionary(c =&gt; c.Key, c =&gt; c.Count());
}


Or to count only capital letters

public static IDictionary&lt;char, int&gt; GetOcurrences(this string value){
    return value
        .Where(c =&gt; c &gt;= 'A' &amp;&amp; c &lt;= 'Z')
        .GroupBy(c =&gt; c)
        .ToDictionary(c =&gt; c.Key, c =&gt; c.Count());
}


Or to count only letters provided by a parameter

public static IDictionary&lt;char, int&gt; GetOcurrences(this string value, string filter){
    return value
        .Where(c =&gt; filter.Contains(c))
        .GroupBy(c =&gt; c)
        .ToDictionary(c =&gt; c.Key, c =&gt; c.Count());
}