How do I limit the number of apache log files

The logs aren't archived, or rotated, by the Apache HTTPd server itself, but by a separate tool called logrotate. Logrotate takes care of most logs. In addition to logs written by daemons like Apache HTTPd, MySQL or Postfix, it also rotates system logs like syslog, auth.log and so forth.

You may want to look into your logrotate configuration in /etc/logrotate.conf (the central config) and the files in /etc/logrotate.d (separate files for different logs). There you can configure which logfiles should be rotated, when to rotate them, how many archived files to keep and so forth.