count = 0 for empty input