implemented count and popCard/testing