Add function to count sum of factorial numbers.