The lone $ was supposed to be changed to $Count before posting but I forgot to. As for the complexity, this one made me think a bit. So if you do decide to rachet it up another notch, just don't make it to big.