How many items are there in a WPF ListBox?

I received a question through my blog. The question was about “a GroupBox which lists some errors. The count of these Errors(ListItems) vary. How can I count the no. of Rows in GroupBox?” Technically, a GroupBox contains only 1 item defined by its content but that’s not a useful answer!  Often the content of a GroupBox is…

1