"Fewer should be used when you are talking about items that can be counted individually, for example, "fewer than 10 apples". Less is correct when quantities cannot be individually counted in that case, e.g. "I would like less water".
But it can be tricky when referring to quantities, says Marie Clair from the Plain English Campaign. For example, we say less than six weeks, not fewer than six weeks, because we are not referring to six individual weeks, but to a single period of time lasting six weeks."