Randomization method call failing for random seeds

In reply to mayurkubavat:

Can you explain how is the system function call different from the user defined function call? Because in some ways, all I was trying to do is implement the behavior of $countones in the class isn’t it?