Test counting() with empty input