Couple of things. Depends on the accuracy of what you are trying to accomplish, but I've done what Mark suggested, that is to use a PIC to 'count' 50/60 Hz cycles, and as long as your sample clock is fast enough to poll for the square wave and update the counter, it works rather well. I had the same problem with a EXAR chip that went obsolete. XR2240, programmed via dip switches, basically it was a counter that could be reloaded at the end of its cycle, or act as a one-shot. Gee...after 10+ years in a design, it finally went obsolete. I ended up doing this one in an ALTERA 7xxx series so I could put all 3 of them in one package, then did a little daughter board for it.