title: List that groups by property and then counts distinct values of another property and writes count to list property
body: <p>I have a list that contains about 50 properties of a class. What I'm struggling with is I"m trying to take a count of the distinct values of two properties This "count" number then needs to be added on to the end of the list of each group by.
  For example: here is my class</p>
  
  <pre><code> public class ListType
  {
      public ListType()
      {
      }
  
      public string ID { get; set; }
      public string REGSID { get; set; }
      public string county { get; set; }
      public string act_loc { get; set; }
      public string eviofnd { get; set; }
      public string hmonth { get; set; }
      public string hisnc { get; set; }
      public string hinc { get; set; }
      public string FIPS { get; set; }
      public decimal back00 {get; set;}
      public decimal ann00 { get; set; }
      public int countDistinctID {get;set;}
  
    }
  </code></pre>
  
  <p>I need to take a count of distinct IDS of each distinct FIPS and then that count of the distinct IDS is set to countDistinctID property of each grouped FIPS.
        ID      FIPS    other columns(still need this data though)</p>
  
  <pre><code>  4        1      ......
  
    5        2       ....
  
    4        1      ....
  
    4        2       ....
  
    1        3     .....
  
    1        2      ....
  
    2        1      .....
  </code></pre>
  
  <p>What I need is this...
        ID    FIPS    other columns  count
        4        1      ......        2  3 rows with FIPS =1 then 2 distinct ID's per FIPs=1</p>
  
  <pre><code>  5        2       ....         3   3 rows w/FIPS=2 3 distinct IDS per FIps=2    
  
    4        1      ....          2
  
    4        2       ....         3
  
    1        3     .....          1   1 row w/fips=3 1 distinct id perFIPS=3
  
    1        2      ....          3
  
    2        1      .....         2
  </code></pre>
  
  <p>I've parsed in a file and I write all the columns to a list called List data</p>
  
  <p>what I ultimately need to do after I take count of distinct ID's is then set that count value to countDistinctID of the original "data" list and do that for each distinct FIPS and ID per that distinct FIPS
          census.countDistinctID</p>