1. Use a 302 redirect script to redirect the link -
http://www.example.com/goto.cgi?http://www.targetexample.com/
Script can be Perl, PHP, etc. I prefer PHP as it makes handling cookies simple
2. Write a script that returns a 302 Location response and logs the click - ip, date/time, url, referrer
3. As long as you are under 30,000 referrals per month you can use an Excel Pivot table to do a monthly analysis.
I run 180,000 referrals per month and have a Perl script that sums the referrals for each link at the end of the month.