The death toll from a boat sinking carrying mourners in Nigeria rose to 24 as search operations continue.