Cookies can make it easy - if the cookie exists, then the visitor should not be re-counted (pretty much a constant time check). Unfortunately, there's no guarantee that the user will not delete the cookie, or even reject it to begin with.
Storing IP address means time spent searching the list of IP addresses for a match (takes linear time, or at least O(log n) if the list is sorted) - plus users may share the same IP address.
I'm not sure what the author of your article had in the mind with "program something for server environment".