please help!! :( A larger circle contains white, striped, and black squares in the same ratio as those shown in the circle below. If the larger circle contains 162 squares, how many of them are black?

The answer is 54, I just counted all the squares which gave me 9, I than multiplied by 18= 162. But that wasn't it, so I divided it by 3, and I got the answer 54.
MESSAGE ME IF I'M WRONG! :')