A planar mechanism has 8 links and 10 rotary joints. The number of degrees of freedom of the mechanism, using Grubler's criterion, is