The figure shows a wooden puzzle consisting of identical blocks. State the number of blocks in contact with the blocks marked A and B.