Force $count to be integer

See #4, hattip grappler