The number of blocks in the second stack is 5 + 2 = <<5+2=7>>7.
The number of blocks in the third stack is 7 − 5 = 2.
The number of blocks in the last stack is 2 + 5 = <<2+5=7>>7.
Pablo used 5 + 7 + 2 + 7 = <<5+7+2+7=21>>21 toy blocks in all.
#### 21