Adding SubForm Entry Count to Merge Document

Adding SubForm Entry Count to Merge Document

Hi! I have a form with a subform that I am using to populate a merge template.

I am waiting to populate a field for the total number of subform entries for the main record. I have looked at formulas, but can't figure out how to accomplish this.

Thanks.