title: Error on using count method in linq cannot to implecitly convert int to bool
body: <pre><code>var result =surveyEntities.Candidates.Join(surveyEntities.Votes, 
  t=&gt;t.CandidateID,
  d=&gt;d.CandidateID,
  (t,d)=&gt; new {
  t=t,
  d=d
  }).GroupBy( temp0=&gt; new  {
  Name= temp0.t.Name, CandidateID=temp0.t.CandidateID,
  Image=temp0.t.Image
  },
  temp0=&gt;temp0.d).Select(g=&gt; new number1{
               CandidateID = g.Key.CandidateID,
               Name = g.Key.Name,
               Image= g.Key.Image, 
               **count= g.Count(p=&gt;p.CandidateID)**}).ToList();
              }
  </code></pre>
  
  <p>I am getting error on following code 'count= g.Count(p=>p.CandidateID)'. I have create a separate class number1 for handling anonymous class but issue is not resolved please help me to find where is the issue.</p>
  
  <p>thanks in advance</p>