a simpler way of getting the count