Would sharing an ip for multiple domains cause any kind of security problems? Imagine there are multiple domains which should be hosted on a server. Which is more secure? Sharing one ip for all the domains or using a dedicated ip for each domain?
There is no security benefit to either approach.
The only security benefit that you would get is by running the sites on different servers, to separate their duties. That way if one gets compromised the others are left intact. In such a setup the number of IPs is still irrelevant; you could have separate internet-facing IPs for each server or you could have some sort of reverse proxy in front with one internet-facing IP. Neither has any particular security benefit over the other (although the latter does open up more options for high availability).