I know that there are some gun company in the US that has made a revolver with a 7 shot chamber instead of 6, but there have never been a 7 cylinder car built that has worked for some reason.
No, but there were many 7 cylinder radial engines built for aircaft. Double-row 14 cylinders were also common.
A 7-cylinder car engine would serve no practical purpose. It would have to be an inline engine which would make it too long to fit in most engine compartments. A V-8 on the other hand would be shorter and have more power.
The 5-cylinder engine is a different story. Mercedes first produced one and the reason for the 5-cylinder is that it gives a perfomance advantage over a 4-cylinder and can fit into engine compartments that the longer inline-6 and wider V-6 can't fit into.