Can't you just initialize it to 0 in the constructor? I don't see how this conditional can be true more than once.