How often should I change my guitar strings?

I was just wondering how often I Should Change my Guitar Strings. I play electric guitar and I tend to practice a couple hours a day. Last time I changed my entire set of strings was at the beginning of April this year, and since then I’ve only changed one string at a time when it broke, which has happened only twice so far. When should I change the complete set? Thanks.