In the config file, the default for "Count Clicks" is "1", but this default was not taken into account in the code.
Steps to reproduce
Install a fresh copy of WebLinks
Open the component options and you will see the "Count Clicks" set to "Yes". Do NOT save the options; just click "Cancel".
Create a new weblink and make sure its "Count Clicks" property is set to "Use Global".
Browse the weblink in the frontend and its href attribute will be the actual URL (e.g. http://www.joomla.org) while in fact it should be something like ...?task=weblink.go&id=1
How to test
After applying the patch, perform the exact steps above and you should see the correct URL.
I will merge it by code review. Thank you @therunnergit!
Important: We need to provide a PR to fix the test (Francesco is working on it atm).