The fieldInfo object is a property of a Describe object. It's class definition is in the arcpy package, but you don't use it from there (how does arcpy know what layer you are referring to?). See the 1st example in the help.
Try:arcpy.Describe(layer).fieldInfo.findFieldByName(!gesamt!))
You also have to pass in the !Join_Count! and Join_Count_1! fields through the expression to the codeblock from the same layer. A cursor pair might be easier if this is for a join table calculation with a runtime assigned layer set. Tryfunction(arcpy.Describe(layer).fieldInfo.findFieldByName(!gesamt!), arcpy.Describe(layer).fieldInfo.findFieldByName(!Join_Count!), arcpy.Describe(layer).fieldInfo.findFieldByName(!Join_Count_1!)))
def function(index, Join_Count, Join_Count_1)