The counting pyramid