Wrap cat counter in IIFE.