There are 6 * 4 = 24 legs among the six cats you have.
Each of the six cats is carrying six bags, so there are a total of 36 bags
Each bag contains 6 cats, so there are a total of 36 * 6 = 216 cats in the bags
These 216 cats have 216 * 4 = 864 legs
There are a total of 222 cats now, which have 222 * 4 = 888 legs (we could also obtain 888 by adding the 24 legs of your 6 cats + the 864 legs of the cats in the bags)
Each cat has 6 kittens. Since there are a total of 222 cats, this amounts to 222 * 6 = 1,332 kittens
The 1,332 kittens have 1,332 * 4 = 5,328 legs
In total, there are 5,328 + 888 = 6,216 legs (assuming none of the cats or kittens have any deformities)