'Placeholder' character to avoid positive comparison?
A good practice — IMO — is to extend if
condition and not to use any dummy characters at all:
for (int i = 0; i < a.length; i++) {
if (!a[i].isEmpty() && !b[i].isEmpty() && a[i].charAt(0) == b[i].charAt(0)) {
count++;
}
}