Unable to view the output

orderStatusCount.collect().foreach(println)

@gsaikiran941 - Could you please paste the full code ?