In VBA and most programming languages, you cannot just say "If x = 0 or
2", you must say "If x = 0 or x = 2", therefore your line should read:
If Application.WorksheetFunction.CountA(Rows(r)) = 0 Or _
Application.WorksheetFunction.CountA(Rows(r)) = 2 _
Or you could store the value in a variable first if you were really
concerned about performance:
Dim intNumCells As Integer
intNumCells = Application.WorksheetFunction.CountA(Rows(r))
If intNumCells = 0 Or IntNumCells = 2 ...