Yes, sessions is the way to do that.
When they hit the homepage check for the session var, if it does not exist then read cookie, create session var and then reset cookie with current data and time. They can hit the home page as often as they want in a session then and last visit will not change, while this visit has already been recorded in the cookie for when they leave your site.
If you have a db then you can track visits that way, but that is not efficient for anonymous visitors as they can delete the cookie and you'll have untold redundant entries in the db.