I added 'num_images()' to the list of functions that are evaluated as intrinsic. I also added a test file in flang/test/Semantics to test calls to 'num_images()'. There was a call to 'num_images()' in flang/test/Semantics/call10.f90 that expected an error, now it no longer produces an error. So I edited that file accordingly. I also edited the intrinsics unit test to add further testing of 'num_images()'.
num_images is not an intrinsic procedure in subclause 16 of the standard; INTRINSIC NUM_IMAGES would not be a valid statement. It shouldn't be here with the actual intrinsics unless you're proposing to make it one as an extension.
I believe it is because 'num_images()' is overloaded with 3 variants and one of these has no arguments. If an argument is found that doesn't fully match the versions of 'num_images()' that do have arguments, then it seems to be interpreting those incorrect calls as an call to the version with no arguments. Thus the error being "too many actual arguments" if the argument is of an unexpected type or "unknown keyword argument" if a correct keyword argument is used, but with an incorrect type. I haven't looked into if there is a way to change the logic of the errors being produced in these cases.
Replied in comment above.