Roll-up summaries allow MAX, MIN, SUM, COUNT, and AVG functions on numeric fields from child records related by a master-detail relationship. Roll-up summaries are limited to master-detail relationships and cannot be used with lookup relationships. An object can have up to 40 roll-up summary fields, not 25. An object can have up to 25 relationship fields (master-detail or lookup), not 20.