There is something wrong. Behaviour You have described doesn't match game rules and Missile Silo building description. You should have build only 5 Interplanetary Missiles (max capacity).
I couldn't reproduce this issue. It can be related to building queue or smth different.
Definitely a bug to investigate. Maybe is it a matter of variable count starting from 1 instead of 0 (common incomprehension between programmers and database admins)? For verification.