Giving Wrong Answer

Please check
Link to ode-> https://ide.codingblocks.com/s/610130
Output should be 6 but it is showing output as 1

what you want to do at line no 67

this is not correct way to call a function

CORRECT STATMENT
cout<<count_rect(coords)<<endl;