Use the method directly. It is almost certainly quite effective. If you have serious performance issues, use the shark and tools to find out why. If you see that most of your time is spent on calls to count, find a way to optimize this, as you suggested here. But do not optimize it prematurely - you are simply wasting your time even thinking about it.
source share