is this method really necessary? at 1st sight it seems like you could do the .count thing in the same line you are implementing this. But if you are going to use this method in many places, then it is ok.