As mentioned by others, the number of colors you can use will depend on the type of website you want to create, the product/s and your personal choices. There is no wrong, just maybe a couple of flexible rules you should keep in mind.
These are some monochromatic / 3 tone websites that work quite well.
Completely monochromatic - Black, white and one single shade of grey to separate elements:

Source
I find this previous one particularly interesting, as the use of color is absolutely minimal. Nonetheless, it looks great. The choice of typography and the images make up for a palette.
One color, one or two shades of dark grey - Black and light green:

Source
Again, good use of typography, with some nice variation, and a background with a subtle texture that lifts the whole thing up.
Couple of shades on color background - Grey(s) on pink:

Source
Striking-color background and a nice contrast with the content. This site proves, for me, that you don't need to go 100% flat (single color humongous square tile) to be simple and polished.
Multiple shades - Black (dark purple?), white and lilac:

Source
Focusing mainly on text, this site only uses shades of lilac/purple. However, it does look a bit plain imho.
I think the main challenge when creating monochromatic sites is not to lose the user's interest. You need something that is slightly unexpected and/or beautiful, be it typography or illustration. And you definitely need good contrast, the more readable something is, the more appealing it seems.
The other element I'd definitely consider is familiarity. For example, you want your buttons to look like buttons, and you want your users to identify them easily. It's not that easy to make a button as obvious using only one color, you will need to add identifiers, such as... a border, for example. So I guess you might encounter a little more difficulty from a usability point of view.