think you’ll find the answer here
http://ww.wp.xz.cn/support/topic/195162
See if your theme folder has a footer.php, then WordPress loads it instead of the default footer.php that comes with WP. And the Stats plugin is called by the default footer.php
So to make Stats work you must include the WP default footer inside the Theme footer using
<?php wp_footer(); ?>
right before the
</body>
</html>
This is why when you changed themes, it worked again since the new theme had that bit of code in the footer and the old one did not.