You have answered 3 which is correct.
Let each process acquire 1 resource each. Then each one would need 1 more resource. Now the minimum number of resources which will guarantee deadlock is never reached is 3 + 1 = 4. Hence the maximum number of resources which would lead to a deadlock is 3.