adding count method