Moved num_inf to separate stats method
Moved num_inf, changed calling function in R - code lot cleaner now.