Calculates the ionic strength of a solution based on the concentrations and charges of the ions present.