adding record counts properly