Without being in front of it this is kind of over my head, but my guess is that
Code:
<!--#include virtual="counter.pl"-->
isn't the kind of executable Apache in OS X can use.

http://carambola.usc.edu/how2makeahitcounter.shtml

The first mcount.zip link on that page is a 404, the next works thought.