Curl redirect fragment

fixes #82
I'm okay with the keeping `$count`, it seems easier to read and understand what I'm checking to me.