#count should accept block