title: counting the elements in datatable
body: <p><a href="https://i.stack.imgur.com/MgDvR.png" rel="nofollow noreferrer">enter image description here</a> <a href="https://i.stack.imgur.com/XbrcW.png" rel="nofollow noreferrer">enter image description here</a> <a href="https://i.stack.imgur.com/InPXj.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>i have been trying to count the no of elements in data table, but therehas been some mistake where the error shows &quot;cant convert long to int&quot;. i am defining it to the parameter. can some one please help me with it. i changed the name of data table and used both the codes mentioned below yet no luck</p>
  <p>CODE:</p>
  <p>1)selectFrom(comp)
  .groupBy(comp.components)
  .uniqueResult(comp.components.count());```</p>
  <p>2)selectFrom(comp)
  .groupBy(comp.components.count());</p>
  <p>Error : &quot;Type mismatch : cannot convert from long to int&quot;</p>
  <p>Data Table : Name is &quot;comp&quot; and column &quot;Components&quot; have the names(string) of the components</p>