Try
private void AccessContacts(string findLastName)
{
Outlook.MAPIFolder folderContacts = this.ActiveExplorer().Session.
GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
Outlook.Items searchFolder = folderContacts.Items;
int counter = 0;
foreach (Outlook.ContactItem foundContact in searchFolder)
{
}
MessageBox.Show("You have " + counter +
" contacts with last names that contain "
+ findLastName + ".");
}