Answer: 4 hands.
Since each person shook a different number of hands, and they didn't shake their own hand or their sibling's, the most handshakes anyone could have reported was 8.
The person who shook 8 hands must have shaken the hand of everyone except themselves and their sibling. Therefore everyone, except their sibling, has shaken hands, so their sibling shook 0 hands.
Similarly it follows that the persons who shook 7 and 1 hands must be siblings, the persons who shook 6 and 2 hands must be siblings, and the persons who shook 5 and 3 hands must be siblings.
The only number left is 4. As there were 10 people, there must have been 10 answers to the question, so two people must have shaken 4 pairs of hands (as we've already had 0, 1 , 2 , 3 , 5 , 6, 7, 8), and as no two people gave the same number, one of these people must have been John, and the other was therefore his brother. So both John and Matthew shook 4 hands.