If Anthony has 12 pets, the number of cats is 2/3 * 12 pets = <<12*2/3=8>>8 cats
The number of dogs that Anthony have is 12 pets - 8 cats = <<12-8=4>>4 dogs
Leonel has 1/2 * 8 cats = <<8*1/2=4>>4 cats.
If Leonel has seven more dogs than Anthony, then he has 4 dogs + 7 dogs = <<7+4=11>>11 dogs
The total number of pets the two have is 11 dogs for Leonel + 4 cats for Leonel + 4 dogs for Anthony + 8 cats for Anthony = <<11+4+4+8=27>>27
#### 27