<p>Ok i think i stumbled on the answer - </p>

<pre><code>$signees = Entry::find()-&gt;sectionId(4)-&gt;count();
</code></pre>

CC BY-SA 3.0
2017-12-14T18:28:23.180Z
2017-12-14T18:47:25.433Z
2017-12-14T18:47:25.433Z
Spotd
<p>What is the best way to get only the total entry number from a section with the least overhead, in the element-api.php? </p>

<p>Thanks</p>

<p>Mark</p>

<plugin-elementapi>
element-api plugin / get entry total in section in Craft 3
# element-api plugin / get entry total in section in Craft 3

(Asked by: username_0 on 2017-12-14)

What is the best way to get only the total entry number from a section with the least overhead, in the element-api.php?

Thanks

Mark

**Tags:** plugin-elementapi

---

## 1 answers

### Answer by username_0 on 2017-12-14. Score: 2

Ok i think i stumbled on the answer - 
$signees = Entry::find()->sectionId(4)->count();


---

