Added `count` method.