Your code is correct as it calls checkUserEmailCount() if $id is not 26 and $id is not 166. By using De Morgan's theorem, we can also write it as:
if (!($id == 26 || $id == 166)) {
checkUserEmailCount();
}
stolzyboy's code is not correct as it always calls checkUserEmailCount(). To illustrate this, let's see what the logical expression evaluates to for the values 0, 285, and 128:
Let $user_id = 0:
0 != 285 || 0 != 128
true || true
true
So checkUserEmailCount() is called when $user_id = 0.
Let $user_id = 285:
285 != 285 || 285 != 128
false || true
true
So checkUserEmailCount() is called when $user_id = 285.
Let $user_id = 128:
128 != 285 || 128 != 128
true || false
true
So checkUserEmailCount() is called when $user_id = 128.
Since the set of numbers chosen for this test is representative of the range of ids, we can conclude just empirically that the code does not work as advertised.