public int GetContactCount() { Window mainWindow = manager.MainWindow; Table table = mainWindow.Get <Table>("uxAddressGrid"); TableRows tableRows = table.Rows; int count = tableRows.Count(); return(count); }