Code:

```
With Sheet1 Dim x As Long
x = .Range("A" & Rows.Count).End(xlUp).Row
Dim cnt As Integer
cnt = 0
For i = 1 To x
If .Cells(i, 1).Value = "Apple" Then
cnt = cnt + 1
End If
Next i
.Range("C1").Value = cnt
End With
```