An isolated character is a character (other than a newline) that doesn't have an adjacent character of the same type. Adjacent characters can be to the left, the right above or below, but not diagonals. For example in the following text H is isolated:

Ybb
YH%
%%%%

All the other characters are not isolated because each of them has at least one other character of the same type adjacent.

Your task is to write a program that takes a string as input and determines the number of isolated characters.

Scoring

You answer will be scored by two metrics. The first is the number of isolated characters in your program. You should aim to minimize this. The second will be the number of bytes in your program. You should minimize this as well. Program size will act as a tie breaker for the first criterion.

Additional Rules

You should support input on the printable ascii range plus any characters you use in your program.

You may consider a line break to either be a newline character or a newline followed by a line feed.

You may take input in any reasonable format. This includes a list of lines.

Takes input as list of lines. The first line in the code never does anything and is only there to minimize isolated characters.

ỴŒĠạþ`€Ẏ§1eⱮCS
Ỵ Split the text on newlines.
ŒĠ Group the multidimensional indices by their value.
€ For each list of indices:
ạ Take the absolute difference...
þ` ...between each pair.
Ẏ Concatenate the lists of differences.
§ Sum the x & y differences. This computes the Manhattan distance.
At this point we have a list for each character in the text of
Manhattan distances between it and it's identical characters.
1eⱮ Is there a 1 in each of the lists? None for isolated characters.
C Complement: 0 <-> 1.
S Sum. Counts the isolated characters

This is one of the ugliest and longest 05AB1E programs I've ever written.. >.> This challenge is deceivingly hard in 05AB1E. I have no doubt in mind the byte-count can at least be halved or even three/four times as small by using a different approach (or even with a similar approach), but I currently don't see how. I'm just glad it's working right now.. If someone else posts a much shorter 05AB1E answer with some smart tricks I'll probably delete this answer out of shame... xD

Your Answer

If this is an answer to a challenge…

…Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.

…Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
Explanations of your answer make it more interesting to read and are very much encouraged.

…Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.

More generally…

…Please make sure to answer the question and provide sufficient detail.

…Avoid asking for help, clarification or responding to other answers (use comments instead).