Implement and test count & count_if