implement Countable interface