You can do what you like. Log cabin blocks have a dark side and a light side and sometimes a bright square in the center, often red. If you stick to that light/dark contrast, you'll get the graphic effect that we love about the Log cabin. The rest is up to you. You can use just 2 colors if you like-- a light one and a dark one.
Me? I like them waaaaaaaaay scrappy, so I use at least 40 or 50 different fabrics.