Implements \Countable interface