Default tables allow you to continuously add rows when you fill out the form, therefore there isn't a fixed number of rows when the template is created. However, this doesn't allow you to have a row for totals or sums at the bottom of the same table. The only way to do it is to create a second table for the totals and cross-reference it to the first table.
To start, navigate to your cursor to the left tab and use 'Default table' under 'Table' for your Table1/data table. Input your data. You can set "Yes/No" as a 'List field' or a 'Text field'.
Note: It is ideal to use a list for "Yes/No" to prevent the user from mispelling the words that would in turn affect the count.
COUNTIF() is not case sensitive. "Yes" = "yes" = "YES"
Next, add a 'Prefilled' table under that and set one cell as your display cell.
Use the formula COUNTIF() to your display cell:
=COUNTIF(Source_Table!Column:Column, "Text")
For example:
Given that
Table1 is the Source_Table
A is the Column
"Yes" is the Text you want to count
Table2 cell B1 is your display cell
Use the formula to Table 2 cell B1,
=COUNTIF(Table1!A:A, "Yes")