Non-homework Statistics Problem

Say there is some magic number machine that gives somewhat random values (I at least think they are random, but I have no idea how this machine works) every second based on several variables that I know (say a,b,c,d).

From what I know about this machine, from watching it, it seems that the number is usually 0, and when it isn't 0 it is a positive whole number from 1 to around 60.

I would like to determine with some degree of certainty some information about the output of the machine. That is, I would like to know the relationship between the variables I put into the machine (a,b,c,d) and some descriptions of the output( frequency of nonzero values, the mean of the nonzero values, and ANYTHING else that I can find that might be useful like standard deviation etc.?).

So my two problems are as follows. First, I can get any sample size from this machine (the lower the better tho), but how do I find a good sample size?

2nd, can anyone suggest a method for determining how a,b,c,d affect the output.

Finally, I am ok at math (taken up to multi-variable calc.) and if you can't help with the above problem, but you know a link or a good book where I can learn this stuff myself, that would be just as helpful.

Also, this is NOT a homework problem, meaning any solution/method that works decently well, no matter how unconventional, will be fine.

O and... I can either write a program to do these calculations, or I can download one if you know a good one.

THANKS FOR ANY HELP :D