implements count interface