I am using CollectionViewSource to filter the records displayed in a ListBox. The xaml follows.
public static int Count(this ICollectionView view) { var index = 0; foreach (var unused in view) { index++; } return index; }