Fewer is always an adjective.
Use fewer to refer to countable items such as pencils, adults, trees, and computers.
Example
Less can be an adjective or an adverb.
As an adjective, use less ONLY to refer to uncountable items such as ink, sugar, sand, and air.
Example
Note the difference:
Link to exercises on fewer / less.