You are right, when keys is null the result of the coalesce operator will be 0 and the if body will not be executed. The problem is that the SonarC# Data Flow Analysis (e.g. Symbolic Execution) does not “understand” numbers and cannot “calculate” the result of the coalesce operator when keys is null. What it sees is a null check and then regardless of the result the keys collection is dereferenced, hence it raises the issue.
I used to use this syntax a lot before, but now I find it more difficult to understand than the plain null check:
if (keys != null && keys.Count > 0)
It is not much more characters, but in my opinion is more straightforward to read from left to right.
If you like this syntax, the only option so far is to mark the issues as false positive or won’t fix in your SonarQube instance. If you use SonarLint for Visual Studio they will stop appearing there as well.