Forty people attended.
This more accurately translates to “participated”, not “attended” (=“ĉeestis”).