The number of Barr bodies in a somatic cell is calculated using the formula: Number of Barr bodies = (Number of X chromosomes) - 1.
In this case, the individual has a 47,XXXX karyotype, meaning there are 4 X chromosomes.
Number of Barr bodies = 4 - 1 = 3.