Suppose there were $182$ coins. That could be $14×13$ or $26×7$, among other things. So we could not tell how many bags or how many coins per bag there are.
Suppose there were $187$ coins. That can only be $11×17$, the product of two primes. But which is $11$, the number of bags or the number of coins per bag?
To avoid these ambiguities, you need a number of coins that is the product of two identical primes, meaning it's the square of this common prime. There is only one such number between $150$ and $200$.
Apparently the king is not triskaidekaphobic ... .