calculate number of stings