CRM Calculation Functions: Building a Count + Equation in a Aggregate Formula

CRM Calculation Functions: Building a Count + Equation in a Aggregate Formula

Hello!

My knowledge of Deluge is VERY limited so I am putting this out for some assistance in writing the following. 

Need: Find the average deal bed count for all deals
Equation: Net New Beds / Total Number of Deals = Avg Deal Bed Count
Missing: Sum of all beds & Total number of deals

I researched and tried using the 'count' function in conjunction with the 'sum' function, but I kept getting syntax errors and I was unable to move past it. 

How do I write this so it counts all the deals and sums up all the beds so that I can build the above equation? 

Any assistance would be greatly appreciated!