title: How to count records in sqlite db table using moor_flutter package?
body: <p>How do I count all rows in a table and get number of rows as a result using the <a href="https://pub.dev/packages/moor_flutter" rel="nofollow noreferrer">moor_flutter</a> package?</p>
  <p>I have seen moor_flutter official documentation <a href="https://moor.simonbinder.eu/docs/" rel="nofollow noreferrer">here</a> but I can't find what I'm looking for.</p>
  <p>I was hoping it would be like the function below according to the similarities in crud functions when using the moor_flutter package but it is not working either.</p>
  <pre class="lang-dart prettyprint-override"><code>Future&lt;int&lt;Person&gt;&gt; countPersons() =&gt; count(persons).get();
  </code></pre>