I don't think it makes sense to nest them, since the reult of countif is just a number (a count), and the input to the outer countif would need to be a range or data value. Probably the results of the previous countif would not be a useful data value to use in the outer countif.
However, it is possible to add the results together, which corresponds to the logic of "count cells with either value1 or value2". For example:
Or you can do some number range expressions, for example
=countif(A2:A20,"<= value2")-countif(A2:A20,"< value1")
should count the number of cells with values between value1 and value2, including any cells containing exactly value1 or value2 values.