Infus already showed the easy solution to this, but to explain a bit about your problem:
The count return value of the UnitBuff API returns the stack number of the one renew you are currently looking at. Since renew can't stack, you'll probably receive a nil for it. If you were to do this manually, you would have to iterate over the whole raid and count how many people are affected by your renew (if you don't care about people not in your group that is... otherwise it gets a lot more difficult like Slippy said).